Revision ff5334e4
b/kamaki/clients/test/cyclades.py | ||
---|---|---|
335 | 335 |
self.assertEqual(self.client.http_client.url, self.url) |
336 | 336 |
self.assertEqual(self.client.http_client.path, '/images/detail') |
337 | 337 |
|
338 |
"""
|
|
339 |
def test_list_images(self):
|
|
340 |
r = self.client.list_images()
|
|
341 |
self.assertTrue(len(r) > 1)
|
|
342 |
r = self.client.list_images(detail=True)
|
|
343 |
for detailed_img in r:
|
|
344 |
if detailed_img['id'] == self.img:
|
|
345 |
break
|
|
346 |
self.assert_dicts_are_equal(detailed_img, self.img_details)
|
|
338 |
def test_get_image_details(self):
|
|
339 |
self.FR.json = img_recv
|
|
340 |
with patch.object(self.C, 'perform_request', return_value=self.FR()):
|
|
341 |
r = self.client.get_image_details(img_ref)
|
|
342 |
self.assertEqual(self.client.http_client.url, self.url)
|
|
343 |
self.assertEqual(
|
|
344 |
self.client.http_client.path,
|
|
345 |
'/images/%s' % img_ref)
|
|
346 |
self.assert_dicts_are_equal(r, img_recv['image'])
|
|
347 | 347 |
|
348 |
""" |
|
348 | 349 |
def test_get_image_details(self): |
349 | 350 |
r = self.client.get_image_details(self.img) |
350 | 351 |
self.assert_dicts_are_equal(r, self.img_details) |
Also available in: Unified diff