Tests on analysis and compensation

* enhances tests for analysis and compensation app
This commit is contained in:
mpeltriaux committed 2023-08-17 12:59:50 +02:00
1 parent 9476713911
commit 564ae4d5db
5 files changed
+16 -5

No files matched your search

+2 -1
View File
@@ -400,12 +400,13 @@ class InterventionWorkflowTestCase(BaseWorkflowTestCase):
self.eco_account.share_with_user_list([self.superuser])
self.eco_account.save()
num_all_deducs = EcoAccountDeduction.objects.count()
num_acc_deducs = self.eco_account.deductions.count()
# Run the request
self.client_user.post(new_url, post_data)
# Expect the deduction to be created, since all constraints are fulfilled
self.assertEqual(1, self.eco_account.deductions.count())
self.assertEqual(num_acc_deducs + 1, self.eco_account.deductions.count())
self.assertEqual(num_all_deducs + 1, EcoAccountDeduction.objects.count())
# Make sure the deduction contains the expected data