From 3a1fe3e257a5e8053ed961d3b6ba21d956ba842b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 20 Apr 2018 15:04:48 +0200 Subject: Manage own permissions with areas for context records (refs #4060) --- archaeological_operations/tests.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'archaeological_operations/tests.py') diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 299ed49f8..6a96ebdf4 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -893,14 +893,14 @@ class OperationInitTest(object): self.operations.append(create_operation(user, orga)) return self.operations - def get_default_operation(self, force=False): + def get_default_operation(self, force=False, user=None): if force: - return self.create_operation()[-1] - ope = self.create_operation()[0] + return self.create_operation(user=user)[-1] + ope = self.create_operation(user=user)[0] if models.Operation.objects.filter(pk=ope.pk).count(): return ope self.operations.pop(0) - return self.create_operation()[-1] + return self.create_operation(user=user)[-1] def tearDown(self): # cleanup for further test @@ -1614,7 +1614,6 @@ class OperationPermissionTest(TestCase, OperationInitTest): self.assertRedirects(response, "/") - class DashboardTest(TestCase, OperationInitTest): fixtures = FILE_FIXTURES -- cgit v1.2.3