diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index b2f38801a..2cb6dd035 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -875,6 +875,19 @@ class OperationTest(TestCase, OperationInitTest): op_code_idx, lbl = find.cached_label.split(' | ') self.assertEqual(op_code_idx, 'OA666-00001') + def test_show(self): + operation = self.operations[0] + c = Client() + response = c.get(reverse('show-operation', kwargs={'pk': operation.pk})) + self.assertEqual(response.status_code, 200) + # empty content when not allowed + self.assertEqual(response.content, "") + + c.login(username=self.username, password=self.password) + response = c.get(reverse('show-operation', kwargs={'pk': operation.pk})) + self.assertEqual(response.status_code, 200) + self.assertIn('class="sheet"', response.content) + class OperationSearchTest(TestCase, OperationInitTest): fixtures = [settings.ROOT_PATH + |