From 607bef280c19a8842ff97629d65bbf8ddf288845 Mon Sep 17 00:00:00 2001 From: "Chaozhe.Chen" Date: Wed, 17 Feb 2016 11:49:22 +0800 Subject: [PATCH] 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 --- designateclient/tests/test_v1/test_reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designateclient/tests/test_v1/test_reports.py b/designateclient/tests/test_v1/test_reports.py index 6d53d3d..0edd154 100644 --- a/designateclient/tests/test_v1/test_reports.py +++ b/designateclient/tests/test_v1/test_reports.py @@ -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")