summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
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
commit2f05339db6fb373bf90c053907b811a05bee4769 (patch)
treeb0599cb52e7a11f64d5aae094b80ed3fdfba5fb5 /archaeological_operations/tests.py
parent1859ebe4a49639989f3efbab134ca2475263cfb1 (diff)
downloadIshtar-2f05339db6fb373bf90c053907b811a05bee4769.tar.bz2
Ishtar-2f05339db6fb373bf90c053907b811a05bee4769.zip
Tests: add show-* tests
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 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 +