fix audit delete failure
Change-Id: Id69ef3a86c5ab234c0e8a4851bc1daadc56935c5 Closes-Bug: #1783969
This commit is contained in:
parent
79fcf55752
commit
15f5f267a6
|
@ -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):
|
||||
|
|
|
@ -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()}
|
||||
|
|
Loading…
Reference in New Issue