Пример #1
0
 def test_single_2(self):
     im = ProductLookImage.load_json(SINGLE_2)
     self.assertEquals(
         im.url,
         'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139249959/orig.jpg'
     )
     self.assertEquals(im.width, 300)
     self.assertEquals(im.height, 280)
Пример #2
0
 def test_list_1(self):
   ims = ProductLookImage.load_json(LIST_1)
   self.assertEquals(len(ims), 2)
   self.assertEquals(ims[0].url, 'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139248813/orig.jpg')
   self.assertEquals(ims[0].width, 300)
   self.assertEquals(ims[0].height, 184)
   self.assertEquals(ims[1].url, 'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139249959/orig.jpg')
   self.assertEquals(ims[1].width, 300)
   self.assertEquals(ims[1].height, 280)
Пример #3
0
 def test_list_1(self):
     ims = ProductLookImage.load_json(LIST_1)
     self.assertEquals(len(ims), 2)
     self.assertEquals(
         ims[0].url,
         'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139248813/orig.jpg'
     )
     self.assertEquals(ims[0].width, 300)
     self.assertEquals(ims[0].height, 184)
     self.assertEquals(
         ims[1].url,
         'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139249959/orig.jpg'
     )
     self.assertEquals(ims[1].width, 300)
     self.assertEquals(ims[1].height, 280)
Пример #4
0
 def test_single_2(self):
   im = ProductLookImage.load_json(SINGLE_2)
   self.assertEquals(im.url, 'http://cdn1.gilt.com/images/share/uploads/0000/0001/3924/139249959/orig.jpg')
   self.assertEquals(im.width, 300)
   self.assertEquals(im.height, 280)