Stop using non-existent method of Mock

There is no method called_once_with() in Mock object.
Use assert_called_once_with() instead.

I tested it in my tox environment. The revised assertion will work.

Change-Id: I530b58a434b4c031d236b0b04e8c7091854c992f
Closes-Bug: #1544522
This commit is contained in:
Chaozhe.Chen 2016-02-17 11:49:22 +08:00
parent e9e6ab9e89
commit 607bef280c

View File

@ -51,4 +51,4 @@ class TestReports(test_v1.APIV1TestCase, test_v1.CrudMixin):
args = mock.MagicMock()
args.other_tenant_id = "uuid"
self.client.reports.tenant_domains(args.other_tenant_id)
self.client.reports.tenant_domains.called_once_with("uuid")
self.client.reports.tenant_domains.assert_called_once_with("uuid")