From a8e50f7b25536511798cff563d997878c36ce77e Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Wed, 12 Jun 2024 15:03:45 +0530 Subject: [PATCH] Fix failing tests --- tests/test_workspaces/test_tasks.py | 1 + tests/test_workspaces/test_views.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_workspaces/test_tasks.py b/tests/test_workspaces/test_tasks.py index 008be5c9..887e3596 100644 --- a/tests/test_workspaces/test_tasks.py +++ b/tests/test_workspaces/test_tasks.py @@ -219,6 +219,7 @@ def test_export_to_sage300( add_accounting_export_expenses ): workspace_id = 1 + AccountingExportSummary.objects.create(workspace_id=workspace_id) accounting_export = AccountingExport.objects.filter(workspace_id=workspace_id).first() advanced_settings = AdvancedSetting.objects.get(workspace_id=workspace_id) diff --git a/tests/test_workspaces/test_views.py b/tests/test_workspaces/test_views.py index 5f4d0cab..45a32c26 100644 --- a/tests/test_workspaces/test_views.py +++ b/tests/test_workspaces/test_views.py @@ -4,7 +4,7 @@ from django.urls import reverse from fyle_accounting_mappings.models import MappingSetting -from apps.accounting_exports.models import AccountingExport +from apps.accounting_exports.models import AccountingExport, AccountingExportSummary from apps.workspaces.models import ( Workspace, Sage300Credential, @@ -425,6 +425,8 @@ def test_trigger_export( """ Test Export Trigger API """ + workspace_id = 1 + AccountingExportSummary.objects.create(workspace_id=workspace_id) url = reverse('trigger-exports', kwargs={'workspace_id': 1}) api_client.credentials(HTTP_AUTHORIZATION='Bearer {}'.format(test_connection.access_token))