def setUp(self): self.identity = fakes.FakeIdentity() vers = pyrax.version.version pyrax.settings._settings = { "default": { "auth_endpoint": "DEFAULT_AUTH", "region": "DFW", "encoding": "utf-8", "http_debug": False, "identity_class": pyrax.rax_identity.RaxIdentity, "identity_type": "rax_identity.RaxIdentity", "keyring_username": "******", "tenant_id": None, "tenant_name": None, "user_agent": "pyrax/%s" % vers, "use_servicenet": False, "verify_ssl": False, }, "alternate": { "auth_endpoint": "ALT_AUTH", "region": "NOWHERE", "encoding": "utf-8", "http_debug": False, "identity_class": pyrax.keystone_identity.KeystoneIdentity, "identity_type": "keystone_identity.KeystoneIdentity", "keyring_username": "******", "tenant_id": None, "tenant_name": None, "user_agent": "pyrax/%s" % vers, "use_servicenet": False, "verify_ssl": False, } } pyrax.identity = fakes.FakeIdentity() pyrax.identity.authenticated = True pyrax.connect_to_cloudservers = Mock() pyrax.connect_to_cloudfiles = Mock() pyrax.connect_to_cloud_loadbalancers = Mock() pyrax.connect_to_cloud_databases = Mock() pyrax._get_service_endpoint = Mock(return_value="http://example.com/") pyrax.USER_AGENT = "DUMMY"
def setUp(self): self.identity = fakes.FakeIdentity() self.client = fakes.FakeQueueClient(self.identity) self.client._manager = fakes.FakeQueueManager(self.client) self.queue = fakes.FakeQueue() self.queue.manager = self.client._manager
def setUp(self): self.identity = fakes.FakeIdentity() self.client = fakes.FakeImageClient(self.identity) self.client._manager = fakes.FakeImageManager(self.client) self.image = fakes.FakeImage() super(ImageTest, self).setUp()