diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-09 17:05:53 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-09 17:05:53 +0200 |
commit | 5cd04a43642ccc3550a0eb57bf4481c08e0402ee (patch) | |
tree | 7b0654c9205bcd7848561f8720384025358efd09 /archaeological_operations | |
parent | c86a8659a4feded67293b544ff8110757bd21c7d (diff) | |
download | Ishtar-5cd04a43642ccc3550a0eb57bf4481c08e0402ee.tar.bz2 Ishtar-5cd04a43642ccc3550a0eb57bf4481c08e0402ee.zip |
Tests: sheet person / organization
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/tests.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 8b0b81571..f2bb390bd 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -920,16 +920,30 @@ class OperationTest(TestCase, OperationInitTest): def test_show(self): operation = self.operations[0] + source = models.OperationSource.objects.create( + operation=operation, title="Source title", + source_type=models.SourceType.objects.all()[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, "") + response = c.get(reverse('show-operationsource', + kwargs={'pk': source.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) + response = c.get(reverse('show-operationsource', + kwargs={'pk': source.pk})) + self.assertEqual(response.status_code, 200) + self.assertIn('class="sheet"', response.content) class OperationSearchTest(TestCase, OperationInitTest): |