Skip to content
Snippets Groups Projects
Commit d284bbfe authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Fix unit tests

parent 38a1cab7
No related branches found
No related tags found
1 merge request!22Add score to transcriptions
......@@ -179,14 +179,14 @@ class TestPageAnnotationListSerializer(APITestCase):
self.page = Page.objects.create(name="page", folio="page")
Zone.objects.create(polygon=[[0, 0], [1337, 0], [1337, 42], [42, 0]],
image=self.img, element=self.page)
self.z1 = Zone.objects.create(polygon=[[100, 200], [100, 300], [300, 300], [300, 200]], image=self.img)
self.z2 = Zone.objects.create(polygon=[[50, 100], [50, 150], [150, 150], [150, 100]], image=self.img)
self.t1 = Transcription.objects.create(text="AAA")
self.t2 = Transcription.objects.create(text="BBB")
self.t1.zones.add(self.z1)
self.t2.zones.add(self.z2)
ElementLink.objects.create(parent=self.page, child=self.t1, order=0)
ElementLink.objects.create(parent=self.page, child=self.t2, order=1)
self.z1 = Zone.objects.create(polygon=[[100, 200], [100, 300], [300, 300], [300, 200]],
image=self.img, element=self.t1)
self.z2 = Zone.objects.create(polygon=[[50, 100], [50, 150], [150, 150], [150, 100]],
image=self.img, element=self.t2)
def test_normal_list(self):
response = self.client.get(reverse('api:page-manifest', kwargs={'pk': self.page.id}))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment