def setUp(self): super(ApiTest, self).setUp() self.context = context.TroveContext() self.guest = api.API(self.context, 0) self.guest._cast = _mock_call_pwd_change self.guest._call = _mock_call self.FAKE_ID = 'instance-id-x23d2d' self.api = api.API(self.context, self.FAKE_ID)
def setUp(self, *args): super(ApiTest, self).setUp() self.context = context.TroveContext() self.guest = api.API(self.context, 0) self.guest._cast = _mock_call_pwd_change self.guest._call = _mock_call self.api = api.API(self.context, "instance-id-x23d2d") self._mock_rpc_client()
def setUp(self): super(ApiTest, self).setUp() self.guest = api.API('mock_content', 0) self.guest._cast = _mock_call_pwd_change self.guest._call = _mock_call self.FAKE_ID = 'instance-id-x23d2d' self.api = api.API(mock(), self.FAKE_ID) when(rpc).call(any(), any(), any(), any(int)).thenRaise( ValueError('Unexpected Rpc Invocation')) when(rpc).cast(any(), any(), any()).thenRaise( ValueError('Unexpected Rpc Invocation'))
def setUp(self): super(ApiTest, self).setUp() self.FAKE_ID = 'instance-id-x23d2d' self.api = api.API(mock(), self.FAKE_ID) when(rpc).call(any(), any(), any(), any(int)).thenRaise( ValueError('Unexpected Rpc Invocation')) when(rpc).cast(any(), any(), any()).thenRaise( ValueError('Unexpected Rpc Invocation'))
def setUp(self): super(CastWithConsumerTest, self).setUp() self.context = context.TroveContext() self.api = api.API(self.context, 'instance-id-x23d2d')
def setUp(self): super(CastWithConsumerTest, self).setUp() self.api = api.API(mock(), 'instance-id-x23d2d')