Refactoring

* adds simple getter methods for UserActionLogEntry
* replaces manual creation of UserActionLogEntry with new methods
This commit is contained in:
2021-11-16 13:15:15 +01:00
parent 7f43f197d5
commit 96caebcae1
12 changed files with 108 additions and 152 deletions

View File

@@ -356,10 +356,7 @@ class InterventionWorkflowTestCase(BaseWorkflowTestCase):
# Prepare the account for a working situation (enough deductable surface, recorded and shared)
self.eco_account.deductable_surface = 10000.00
if self.eco_account.recorded is None:
rec_action = UserActionLogEntry.objects.create(
user=self.superuser,
action=UserAction.RECORDED
)
rec_action = UserActionLogEntry.get_recorded_action(self.superuser)
self.eco_account.recorded = rec_action
self.eco_account.share_with_list([self.superuser])
self.eco_account.save()