We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8fe9281 + 6069592 commit 3b4378cCopy full SHA for 3b4378c
nova/tests/unit/scheduler/client/test_report.py
@@ -42,8 +42,14 @@ def setUp(self):
42
super(SafeConnectedTestCase, self).setUp()
43
self.context = context.get_admin_context()
44
45
- with mock.patch('keystoneauth1.loading.load_auth_from_conf_options'):
46
- self.client = report.SchedulerReportClient()
+ # need to mock this globally as SchedulerReportClient._create_client
+ # is called again when EndpointNotFound is raised
47
+ self.useFixture(
48
+ fixtures.MonkeyPatch(
49
+ 'keystoneauth1.loading.load_auth_from_conf_options',
50
+ mock.MagicMock()))
51
+
52
+ self.client = report.SchedulerReportClient()
53
54
@mock.patch('keystoneauth1.session.Session.request')
55
def test_missing_endpoint(self, req):
0 commit comments