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__))
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)
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__))
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)