#86 Edit deductions
* adds support for editing deductions * adds tests * improves major base test logic
This commit is contained in:
@@ -21,17 +21,18 @@ class CompensationWorkflowTestCase(BaseWorkflowTestCase):
|
||||
def setUpTestData(cls):
|
||||
super().setUpTestData()
|
||||
|
||||
# Give the user shared access to the dummy intervention -> inherits the access to the compensation
|
||||
cls.intervention.share_with(cls.superuser)
|
||||
|
||||
# Make sure the intervention itself would be fine with valid data
|
||||
cls.intervention = cls.fill_out_intervention(cls.intervention)
|
||||
|
||||
# Make sure the compensation is linked to the intervention
|
||||
cls.intervention.compensations.set([cls.compensation])
|
||||
|
||||
def setUp(self) -> None:
|
||||
super().setUp()
|
||||
|
||||
# Give the user shared access to the dummy intervention -> inherits the access to the compensation
|
||||
self.intervention.share_with(self.superuser)
|
||||
|
||||
# Make sure the intervention itself would be fine with valid data
|
||||
self.intervention = self.fill_out_intervention(self.intervention)
|
||||
|
||||
# Make sure the compensation is linked to the intervention
|
||||
self.intervention.compensations.set([self.compensation])
|
||||
|
||||
# Delete all existing compensations, which might be created by tests
|
||||
Compensation.objects.all().delete()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user