From 85bf38cfd5e0810a01ac8a77806371ee465aa8f1 Mon Sep 17 00:00:00 2001 From: Dao Cong Tien Date: Mon, 30 May 2016 15:35:18 +0700 Subject: [PATCH] Remove mox from compute/test_instance_usage_audit_log.py Replaced stubs.Set() with stub_out() in tests/unit/api/openstack/compute/test_instance_usage_audit_log.py Part of blueprint remove-mox-newton Change-Id: Ib99e4bd74e7c2230d2c788a0370c8f9253318702 --- .../api/openstack/compute/test_instance_usage_audit_log.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nova/tests/unit/api/openstack/compute/test_instance_usage_audit_log.py b/nova/tests/unit/api/openstack/compute/test_instance_usage_audit_log.py index 4ecdb553c5d3..47672677b464 100644 --- a/nova/tests/unit/api/openstack/compute/test_instance_usage_audit_log.py +++ b/nova/tests/unit/api/openstack/compute/test_instance_usage_audit_log.py @@ -25,7 +25,6 @@ from nova import exception from nova import test from nova.tests.unit.api.openstack import fakes from nova.tests.unit.objects import test_service -from nova import utils service_base = test_service.fake_service @@ -123,8 +122,8 @@ class InstanceUsageAuditLogTestV21(test.NoDBTestCase): self.assertIsNone(disabled) return TEST_COMPUTE_SERVICES - self.stubs.Set(utils, 'last_completed_audit_period', - fake_last_completed_audit_period) + self.stub_out('nova.utils.last_completed_audit_period', + fake_last_completed_audit_period) self.stub_out('nova.db.service_get_all', fake_service_get_all) self.stub_out('nova.db.task_log_get_all', fake_task_log_get_all)