def setUp(self): ServerLove.connectionCls.conn_class = ElasticStackMockHttp self.driver = ServerLove('foo', 'bar') images = self.driver.list_images() self.image = [i for i in images if i.id == '679f5f44-0be7-4745-a658-cccd4334c1aa'][0] super(ServerLoveTestCase, self).setUp()
def setUp(self): ServerLove.connectionCls.conn_classes = (None, ElasticStackMockHttp) self.driver = ServerLove('foo', 'bar') images = self.driver.list_images() self.image = [i for i in images if \ i.id == '679f5f44-0be7-4745-a658-cccd4334c1aa'][0] ElasticStackTestCase.setUp(self) unittest.TestCase.setUp(self)
class ServerLoveTestCase(ElasticStackTestCase, unittest.TestCase): def setUp(self): ServerLove.connectionCls.conn_class = ElasticStackMockHttp self.driver = ServerLove("foo", "bar") images = self.driver.list_images() self.image = [ i for i in images if i.id == "679f5f44-0be7-4745-a658-cccd4334c1aa" ][0] super(ServerLoveTestCase, self).setUp()