From e32ecd011ff8a70c5915469ae883eda2658cc28a Mon Sep 17 00:00:00 2001
From: Erwan Rouchet <rouchet@teklia.com>
Date: Thu, 17 May 2018 12:15:01 +0200
Subject: [PATCH] Fix unit tests some more

---
 arkindex/images/tests.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arkindex/images/tests.py b/arkindex/images/tests.py
index 761c37c260..bc856c8d60 100644
--- a/arkindex/images/tests.py
+++ b/arkindex/images/tests.py
@@ -50,11 +50,11 @@ class TestBulkTranscriptions(TestCase):
         self.assertEqual(out[1].text, 'test 2')
         self.assertEqual(out[1].score, 0.2)
 
-        self.assertEqual(out[0].zones.count(), 1)
-        self.assertEqual(out[1].zones.count(), 1)
-        z1, z2 = out[0].zones.first(), out[1].zones.first()
-        self.assertListEqual(z1.polygon, [[0, 0], [0, 100], [100, 100], [100, 0]])
-        self.assertListEqual(z2.polygon, [[20, 20], [20, 120], [120, 120], [120, 20]])
+        self.assertIsNotNone(out[0].zone)
+        self.assertIsNotNone(out[1].zone)
+
+        self.assertListEqual(out[0].zone.polygon, [[0, 0], [0, 100], [100, 100], [100, 0]])
+        self.assertListEqual(out[1].zone.polygon, [[20, 20], [20, 120], [120, 120], [120, 20]])
 
     def test_bulk_transcriptions_unique(self):
         """Check bulk_transcriptions does not import the same transcriptions twice"""
-- 
GitLab