diff --git a/arkindex/images/tests.py b/arkindex/images/tests.py index 761c37c2604b5e623cad537b728657a37e8bf211..bc856c8d60380c16f40f1c433da90279fba6df3f 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"""