From 1a2ebffb931c7cbfd6765f88a464fda9256d851d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 1 Aug 2017 10:47:29 +0200 Subject: Tests: add ODT export test on operations --- archaeological_operations/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 1c63de93b..e0e5d5313 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -932,6 +932,13 @@ class OperationTest(TestCase, OperationInitTest): self.assertEqual(response.status_code, 200) self.assertIn('class="sheet"', response.content) + response = c.get(reverse('show-operation', kwargs={'pk': operation.pk, + 'type': 'odt'})) + self.assertEqual(response.status_code, 200) + f = StringIO.StringIO(response.content) + z = zipfile.ZipFile(f) + self.assertIsNone(z.testzip()) + class OperationSearchTest(TestCase, OperationInitTest): fixtures = FILE_FIXTURES -- cgit v1.2.3