summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-02 14:27:32 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-02 14:27:32 +0200
commitab254942c9a0edb1a595152e3269ed5ca104b227 (patch)
treefcd2b7921b0ee29ca9ac146a59bde0bb21cc38a1 /archaeological_operations/tests.py
parent5803cee0ebfb57779a21da987f0ca557a7c7bd39 (diff)
parent673ea8a1c017568d93fbe63634ad7bcd4dc19ed3 (diff)
downloadIshtar-ab254942c9a0edb1a595152e3269ed5ca104b227.tar.bz2
Ishtar-ab254942c9a0edb1a595152e3269ed5ca104b227.zip
Merge branch 'master' into develop
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 230a66beb..83672a9f9 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -881,6 +881,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 +