diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-02 14:26:18 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-02 14:26:18 +0200 |
commit | 673ea8a1c017568d93fbe63634ad7bcd4dc19ed3 (patch) | |
tree | b0599cb52e7a11f64d5aae094b80ed3fdfba5fb5 /archaeological_operations/tests.py | |
parent | 3929ad5280a3f14be6a2f2e9d49fa397509a1dd1 (diff) | |
download | Ishtar-673ea8a1c017568d93fbe63634ad7bcd4dc19ed3.tar.bz2 Ishtar-673ea8a1c017568d93fbe63634ad7bcd4dc19ed3.zip |
Tests: add show-* tests
Diffstat (limited to 'archaeological_operations/tests.py')
-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 + |