diff --git a/os_service_types/tests/base.py b/os_service_types/tests/base.py index 731d152..38f0444 100644 --- a/os_service_types/tests/base.py +++ b/os_service_types/tests/base.py @@ -18,7 +18,6 @@ import copy import datetime -import keystoneauth1.session from oslotest import base import os_service_types.service_types @@ -30,9 +29,6 @@ class TestCase(base.BaseTestCase): def setUp(self): super(TestCase, self).setUp() - # use keystoneauth1 to get a Sessiom with no auth information - self.session = keystoneauth1.session.Session() - self.builtin_content = os_service_types.service_types.BUILTIN_DATA self.builtin_version = self.builtin_content['version'] diff --git a/os_service_types/tests/test_remote.py b/os_service_types/tests/test_remote.py index 2a1e8e5..bf3d714 100644 --- a/os_service_types/tests/test_remote.py +++ b/os_service_types/tests/test_remote.py @@ -24,6 +24,8 @@ available in these tests. from requests_mock.contrib import fixture as rm_fixture from testscenarios import load_tests_apply_scenarios as load_tests # noqa +import keystoneauth1.session + import os_service_types import os_service_types.service_types from os_service_types.tests import base @@ -39,6 +41,8 @@ class TestRemote(base.TestCase, base.ServiceDataMixin): 'GET', os_service_types.service_types.SERVICE_TYPES_URL, json=self.remote_content, headers={'etag': self.getUniqueString('etag')}) + # use keystoneauth1 to get a Sessiom with no auth information + self.session = keystoneauth1.session.Session() # Make an object that fetches from the network self.service_types = os_service_types.ServiceTypes( session=self.session)