Merge "Use keystoneauth only in applicable test"
This commit is contained in:
commit
b6ac042ece
|
@ -18,7 +18,6 @@
|
||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import keystoneauth1.session
|
|
||||||
from oslotest import base
|
from oslotest import base
|
||||||
|
|
||||||
import os_service_types.service_types
|
import os_service_types.service_types
|
||||||
|
@ -30,9 +29,6 @@ class TestCase(base.BaseTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TestCase, self).setUp()
|
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_content = os_service_types.service_types.BUILTIN_DATA
|
||||||
self.builtin_version = self.builtin_content['version']
|
self.builtin_version = self.builtin_content['version']
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ available in these tests.
|
||||||
from requests_mock.contrib import fixture as rm_fixture
|
from requests_mock.contrib import fixture as rm_fixture
|
||||||
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
|
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
|
||||||
|
|
||||||
|
import keystoneauth1.session
|
||||||
|
|
||||||
import os_service_types
|
import os_service_types
|
||||||
import os_service_types.service_types
|
import os_service_types.service_types
|
||||||
from os_service_types.tests import base
|
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,
|
'GET', os_service_types.service_types.SERVICE_TYPES_URL,
|
||||||
json=self.remote_content,
|
json=self.remote_content,
|
||||||
headers={'etag': self.getUniqueString('etag')})
|
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
|
# Make an object that fetches from the network
|
||||||
self.service_types = os_service_types.ServiceTypes(
|
self.service_types = os_service_types.ServiceTypes(
|
||||||
session=self.session)
|
session=self.session)
|
||||||
|
|
Loading…
Reference in New Issue