示例#1
0
 def setUp(self):
     super(TestList, self).setUp()
     self.accs = []
     for i in range(3):
         acc = obj_utils.create_test_accelerator(self.context)
         self.accs.append(acc)
     self.acc = self.accs[0]
     self.context.tenant = self.acc.project_id
     self.headers = self.gen_headers(self.context)
示例#2
0
    def setUp(self):
        super(TestDelete, self).setUp()
        self.acc = obj_utils.create_test_accelerator(self.context)
        self.context.tenant = self.acc.project_id
        self.headers = self.gen_headers(self.context)

        p = mock.patch.object(rpcapi.ConductorAPI, 'accelerator_delete')
        self.mock_delete = p.start()
        self.mock_delete.side_effect = _rpcapi_accelerator_delete
        self.addCleanup(p.stop)