Beispiel #1
0
 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)
Beispiel #2
0
 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()
Beispiel #3
0
 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'))
Beispiel #4
0
 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'))
Beispiel #5
0
 def setUp(self):
     super(CastWithConsumerTest, self).setUp()
     self.context = context.TroveContext()
     self.api = api.API(self.context, 'instance-id-x23d2d')
Beispiel #6
0
 def setUp(self):
     super(CastWithConsumerTest, self).setUp()
     self.api = api.API(mock(), 'instance-id-x23d2d')