diff --git a/watcher_dashboard/api/watcher.py b/watcher_dashboard/api/watcher.py index 0a2a456..7ce6423 100644 --- a/watcher_dashboard/api/watcher.py +++ b/watcher_dashboard/api/watcher.py @@ -127,7 +127,7 @@ class Audit(base.APIDictWrapper): the ID :rtype: :py:class:`~.Audit` """ - return watcherclient(request).audit.get(audit_id=audit_id) + return watcherclient(request).audit.get(audit=audit_id) @classmethod def delete(cls, request, audit_id): @@ -139,7 +139,7 @@ class Audit(base.APIDictWrapper): :param audit_id: audit id :type audit_id: int """ - watcherclient(request).audit.delete(audit_id=audit_id) + return watcherclient(request).audit.delete(audit=audit_id) @property def id(self): diff --git a/watcher_dashboard/test/api_tests/watcher_tests.py b/watcher_dashboard/test/api_tests/watcher_tests.py index 3638762..669fdf0 100644 --- a/watcher_dashboard/test/api_tests/watcher_tests.py +++ b/watcher_dashboard/test/api_tests/watcher_tests.py @@ -207,7 +207,7 @@ class WatcherAPITests(test.APITestCase): ret_val = api.watcher.Audit.get(self.request, audit_id) self.assertIsInstance(ret_val, dict) watcherclient.audit.get.assert_called_with( - audit_id=audit_id) + audit=audit_id) def test_audit_create(self): audit = self.api_audits.first() @@ -275,7 +275,7 @@ class WatcherAPITests(test.APITestCase): api.watcher.Audit.delete(self.request, audit_id) watcherclient.audit.delete.assert_called_with( - audit_id=audit_id) + audit=audit_id) def test_action_plan_list(self): action_plans = {'action_plans': self.api_action_plans.list()}