Tests on analysis and compensation

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

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