示例#1
0
 def test_bad_region(self):
     try:
         f = amifilter.AMIFilter(regions=['middleearth-mordor-1'],
                                 owner='amazon')
         images = amifind.find(f)
     except Exception as ex:
         self.assertEqual(
             True, isinstance(ex, amifind.exceptions.AMIFilterException),
             "%s, %s : %s" % (ex.message, type(ex), ex.__class__))
示例#2
0
 def test_get_amazon_syd_images(self):
     result = amifind.find(amifind.Filters.LINUX_AMAZON_64_PV_EBS.with_regions(['ap-southeast-2']))
     self.assertEqual(1, len(result.regions))
     self.assertNotEqual(0, result.ami_count)
示例#3
0
 def test_bad_region(self):
     try:
         f = amifilter.AMIFilter(regions=['middleearth-mordor-1'], owner='amazon')
         images = amifind.find(f)
     except Exception as ex:
         self.assertEqual(True, isinstance(ex, amifind.exceptions.AMIFilterException), "%s, %s : %s" % (ex.message, type(ex), ex.__class__))
示例#4
0
 def test_get_amazon_syd_images(self):
     result = amifind.find(
         amifind.Filters.LINUX_AMAZON_64_PV_EBS.with_regions(
             ['ap-southeast-2']))
     self.assertEqual(1, len(result.regions))
     self.assertNotEqual(0, result.ami_count)