push
This commit is contained in:
11
tests/test_sync.py
Normal file
11
tests/test_sync.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from app.models.company import Company
|
||||
from app.models.invoice import Invoice
|
||||
from app.services.sync_service import SyncService
|
||||
|
||||
|
||||
def test_sync_creates_invoices(app):
|
||||
with app.app_context():
|
||||
company = Company.query.first()
|
||||
log = SyncService(company).run_manual_sync()
|
||||
assert log.status == 'finished'
|
||||
assert Invoice.query.filter_by(company_id=company.id).count() > 0
|
||||
Reference in New Issue
Block a user