Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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'))
Ejemplo n.º 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'))
Ejemplo n.º 5
0
 def setUp(self):
     super(CastWithConsumerTest, self).setUp()
     self.context = context.TroveContext()
     self.api = api.API(self.context, 'instance-id-x23d2d')
Ejemplo n.º 6
0
 def setUp(self):
     super(CastWithConsumerTest, self).setUp()
     self.api = api.API(mock(), 'instance-id-x23d2d')