Exemple #1
0
 def test_create_object(self):
     testobject = MuseumRecord()
     testobject.api_id = 100554
     testobject.save()
     img_ref = testobject.get_primary_image_id
     self.assertEquals(
         testobject.get_primary_image,
         "http://media.vam.ac.uk/media/thira/collection_images/2006AG/2006AG6013.jpg"
     )
Exemple #2
0
 def test_create_img_objects(self):
     testobject = MuseumRecord()
     testobject.api_id = 100554
     testobject.save()
     imgs = RecordImage.objects.filter(Record = testobject)
     self.assertEquals(len(imgs), 7)
Exemple #3
0
 def test_create_object(self):
     testobject = MuseumRecord()
     testobject.api_id = 100554
     testobject.save()
     img_ref = testobject.get_primary_image_id
     self.assertEquals(img_ref, "2006AG6013")
Exemple #4
0
 def test_create_object(self):
     testobject = MuseumRecord()
     testobject.api_id = 12345
     testobject.save()
     data = testobject.get_api_data
     self.assertEquals(data['fields']['artist'],'Rogers, William, Harry')