summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-11 14:49:28 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-07-11 14:49:28 +0200
commit4fcc46584a2f55048173c0d718be5bf76a74127d (patch)
tree2054df617244c89d93b7a3b678d13ea25d78a92f /archaeological_operations
parentf64baa1026aaf79e62cd604ac94dc21382f07e5a (diff)
parentfba85439ce71086c6153cb3bb57b48567bbfad85 (diff)
downloadIshtar-4fcc46584a2f55048173c0d718be5bf76a74127d.tar.bz2
Ishtar-4fcc46584a2f55048173c0d718be5bf76a74127d.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_operations')
-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 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 +