def setUp(self): # fire up fake euca # and then kill it when we are done mc = services.mc_mock.Client(["localhost:11211"], 1) mc.set("test_token", {"test_cloud": {"username": "******"}}, None) auth = KeystoneProxy("test_cloud", "test_token", mc, eucarc_path="tukey_middleware/tests/data/%s") self.cloud = EucaDriver(auth)
class EucaDriverTestCase(unittest.TestCase): ''' The Eucalyptus Driver ''' def setUp(self): # fire up fake euca # and then kill it when we are done mc = services.mc_mock.Client(["localhost:11211"], 1) mc.set("test_token", {"test_cloud": {"username": "******"}}, None) auth = KeystoneProxy("test_cloud", "test_token", mc, eucarc_path="tukey_middleware/tests/data/%s") self.cloud = EucaDriver(auth) def test_euca_instances(self): instances = self.cloud.list_instances() inst_dict = instances[0] assert inst_dict["image"]["id"] == "00938d13-6d00-0000-0000-000000000000"