diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2016-01-08 00:53:55 -0500 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2016-01-13 22:19:38 -0500 |
commit | 88f406335ea2e76e48e7bf6331dc8a189f3698d9 (patch) | |
tree | aed6c71df8973ec29628921dcfb86687c0c37a3b /nova/tests/unit/test_notifications.py | |
parent | e75018664a8c94b2745500a7fd5c42e9b95dc5bc (diff) | |
download | nova-88f406335ea2e76e48e7bf6331dc8a189f3698d9.tar.gz |
Replace stubs.Set with stub_out (fakes)
As part of the ongoing effort to stop using mox, start replacing
stubs.Set calls with stub_out.
Limit the scope of this patch to the following fake functions:
- fake_get_instance_nw_info
- stub_nw_info
- stub_out_instance_quota
- stub_out_networking
- stub_out_nw_api
- stub_out_nw_api_get_instance_nw_info
- set_stub_network_methods
- stub_out_network_cleanup
- unset_stub_network_methods
Part of bp:remove-mox
Change-Id: I70215fb25ef25422786b96d33c91d8f1d4760a23
Diffstat (limited to 'nova/tests/unit/test_notifications.py')
-rw-r--r-- | nova/tests/unit/test_notifications.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/tests/unit/test_notifications.py b/nova/tests/unit/test_notifications.py index 925ef1f669..ec4a4fdb80 100644 --- a/nova/tests/unit/test_notifications.py +++ b/nova/tests/unit/test_notifications.py @@ -45,7 +45,7 @@ class NotificationsTestCase(test.TestCase): super(NotificationsTestCase, self).setUp() self.fixture = self.useFixture(o_fixture.ClearRequestContext()) - self.net_info = fake_network.fake_get_instance_nw_info(self.stubs, 1, + self.net_info = fake_network.fake_get_instance_nw_info(self, 1, 1) def fake_get_nw_info(cls, ctxt, instance): @@ -54,7 +54,7 @@ class NotificationsTestCase(test.TestCase): self.stubs.Set(network_api.API, 'get_instance_nw_info', fake_get_nw_info) - fake_network.set_stub_network_methods(self.stubs) + fake_network.set_stub_network_methods(self) fake_notifier.stub_notifier(self.stubs) self.addCleanup(fake_notifier.reset) |