Пример #1
0
 def test_delete_lb(self, mock_command, mock_driver, mock_bal):
     api.delete_lb(self.conf, self.lb_id)
     self.assertTrue(mock_command.called)
     self.assertTrue(mock_driver.called)
Пример #2
0
 def delete(self, req, **args):
     logger.debug("Got delete request. Request: %s", req)
     core_api.delete_lb(self.conf, args['id'])
     return "OK"
Пример #3
0
 def delete(self, req, id):
     LOG.debug("Got delete request. Request: %s", req)
     core_api.delete_lb(self.conf, id)
 def test_delete_lb(self, mock_command, mock_driver, mock_api):
     mock_api.return_value = mock.MagicMock()
     api.delete_lb(self.conf, self.lb_id)
     self.assertTrue(mock_api.called)
     self.assertTrue(mock_command.called)
     self.assertTrue(mock_driver.called)
Пример #5
0
 def test_delete_lb(self, *mocks):
     mocks[2].return_value = mock.MagicMock()
     api.delete_lb(self.conf, 'fake_tenant', self.lb_id)
     for m in mocks:
         self.assertTrue(m.called, "Mock %s wasn't called"
                 % m._mock_name)