Tests use "from keystone import tests"
Use "from keystone import tests" rather than "from keystone.tests import core as test". This is consistent with how other packages are imported throughout Keystone. Change-Id: Ib0b9ace7468c869f226e8d6c5ab1297563463200
This commit is contained in:
parent
65af0eda6d
commit
33c8025094
|
@ -23,7 +23,7 @@ from keystone.common import ldap as ldap_common
|
|||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.identity.backends import ldap as identity_ldap
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_backend_ldap
|
||||
|
||||
|
@ -73,9 +73,9 @@ class LiveLDAPIdentity(test_backend_ldap.LDAPIdentity):
|
|||
'ou': 'UserGroups'})
|
||||
|
||||
def _set_config(self):
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_liveldap.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_liveldap.conf')])
|
||||
|
||||
def test_build_tree(self):
|
||||
"""Regression test for building the tree names
|
||||
|
@ -86,7 +86,7 @@ class LiveLDAPIdentity(test_backend_ldap.LDAPIdentity):
|
|||
self.assertEquals(user_api.tree_dn, CONF.ldap.user_tree_dn)
|
||||
|
||||
def tearDown(self):
|
||||
test.TestCase.tearDown(self)
|
||||
tests.TestCase.tearDown(self)
|
||||
|
||||
def test_ldap_dereferencing(self):
|
||||
alt_users_ldif = {'objectclass': ['top', 'organizationalUnit'],
|
||||
|
|
|
@ -21,7 +21,7 @@ import ldap.modlist
|
|||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone import identity
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import _ldap_livetest
|
||||
|
||||
|
@ -40,9 +40,9 @@ def create_object(dn, attrs):
|
|||
class LiveTLSLDAPIdentity(_ldap_livetest.LiveLDAPIdentity):
|
||||
|
||||
def _set_config(self):
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_tls_liveldap.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_tls_liveldap.conf')])
|
||||
|
||||
def test_tls_certfile_demand_option(self):
|
||||
CONF.ldap.use_tls = True
|
||||
|
|
|
@ -20,7 +20,7 @@ import uuid
|
|||
from keystone.common.sql import migration
|
||||
from keystone import contrib
|
||||
from keystone.openstack.common import importutils
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_v3
|
||||
|
||||
|
@ -33,7 +33,7 @@ class TestExtensionCase(test_v3.RestfulTestCase):
|
|||
def setup_database(self):
|
||||
self.conf_files = super(TestExtensionCase, self).config_files()
|
||||
self.conf_files.append(
|
||||
test.testsdir('test_associate_project_endpoint_extension.conf'))
|
||||
tests.testsdir('test_associate_project_endpoint_extension.conf'))
|
||||
super(TestExtensionCase, self).setup_database()
|
||||
package_name = "%s.%s.migrate_repo" % (contrib.__name__,
|
||||
self.EXTENSION_NAME)
|
||||
|
|
|
@ -16,7 +16,7 @@ import copy
|
|||
import datetime
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import auth
|
||||
from keystone import config
|
||||
|
@ -60,7 +60,7 @@ def _build_user_auth(token=None, user_id=None, username=None,
|
|||
return auth_json
|
||||
|
||||
|
||||
class AuthTest(test.TestCase):
|
||||
class AuthTest(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(AuthTest, self).setUp()
|
||||
|
||||
|
@ -843,7 +843,7 @@ class TokenExpirationTest(AuthTest):
|
|||
self._maintain_token_expiration()
|
||||
|
||||
|
||||
class NonDefaultAuthTest(test.TestCase):
|
||||
class NonDefaultAuthTest(tests.TestCase):
|
||||
|
||||
def test_add_non_default_auth_method(self):
|
||||
self.opt_in_group('auth', methods=['password', 'token', 'custom'])
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import auth
|
||||
from keystone import exception
|
||||
|
@ -39,15 +39,15 @@ class SimpleChallengeResponse(auth.AuthMethodHandler):
|
|||
return {"challenge": "What's the name of your high school?"}
|
||||
|
||||
|
||||
class TestAuthPlugin(test.TestCase):
|
||||
class TestAuthPlugin(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(TestAuthPlugin, self).setUp()
|
||||
self.config([
|
||||
test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_sql.conf'),
|
||||
test.testsdir('backend_sql_disk.conf'),
|
||||
test.testsdir('test_auth_plugin.conf')])
|
||||
tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_sql.conf'),
|
||||
tests.testsdir('backend_sql_disk.conf'),
|
||||
tests.testsdir('test_auth_plugin.conf')])
|
||||
self.load_backends()
|
||||
auth.controllers.AUTH_METHODS[METHOD_NAME] = SimpleChallengeResponse()
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import copy
|
|||
import datetime
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.catalog import core
|
||||
from keystone import config
|
||||
|
@ -2777,7 +2777,7 @@ class TrustTests(object):
|
|||
self.assertEqual(len(trusts), 3)
|
||||
|
||||
|
||||
class CommonHelperTests(test.TestCase):
|
||||
class CommonHelperTests(tests.TestCase):
|
||||
def test_format_helper_raises_malformed_on_missing_key(self):
|
||||
self.assertRaises(exception.MalformedEndpoint,
|
||||
core.format_url,
|
||||
|
|
|
@ -17,13 +17,13 @@ import uuid
|
|||
|
||||
from keystone import exception
|
||||
from keystone import identity
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import default_fixtures
|
||||
import test_backend
|
||||
|
||||
|
||||
class KvsIdentity(test.TestCase, test_backend.IdentityTests):
|
||||
class KvsIdentity(tests.TestCase, test_backend.IdentityTests):
|
||||
def setUp(self):
|
||||
super(KvsIdentity, self).setUp()
|
||||
identity.CONF.identity.driver = (
|
||||
|
@ -63,7 +63,7 @@ class KvsIdentity(test.TestCase, test_backend.IdentityTests):
|
|||
self.skipTest('Blocked by bug 1119770')
|
||||
|
||||
|
||||
class KvsToken(test.TestCase, test_backend.TokenTests):
|
||||
class KvsToken(tests.TestCase, test_backend.TokenTests):
|
||||
def setUp(self):
|
||||
super(KvsToken, self).setUp()
|
||||
identity.CONF.identity.driver = (
|
||||
|
@ -71,7 +71,7 @@ class KvsToken(test.TestCase, test_backend.TokenTests):
|
|||
self.load_backends()
|
||||
|
||||
|
||||
class KvsTrust(test.TestCase, test_backend.TrustTests):
|
||||
class KvsTrust(tests.TestCase, test_backend.TrustTests):
|
||||
def setUp(self):
|
||||
super(KvsTrust, self).setUp()
|
||||
identity.CONF.identity.driver = (
|
||||
|
@ -84,7 +84,7 @@ class KvsTrust(test.TestCase, test_backend.TrustTests):
|
|||
self.load_fixtures(default_fixtures)
|
||||
|
||||
|
||||
class KvsCatalog(test.TestCase, test_backend.CatalogTests):
|
||||
class KvsCatalog(tests.TestCase, test_backend.CatalogTests):
|
||||
def setUp(self):
|
||||
super(KvsCatalog, self).setUp()
|
||||
identity.CONF.identity.driver = (
|
||||
|
|
|
@ -27,7 +27,7 @@ from keystone.common import sql
|
|||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone import identity
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import default_fixtures
|
||||
import test_backend
|
||||
|
@ -54,9 +54,9 @@ class BaseLDAPIdentity(test_backend.IdentityTests):
|
|||
return CONF
|
||||
|
||||
def _set_config(self):
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_ldap.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_ldap.conf')])
|
||||
|
||||
def test_build_tree(self):
|
||||
"""Regression test for building the tree names
|
||||
|
@ -306,7 +306,7 @@ class BaseLDAPIdentity(test_backend.IdentityTests):
|
|||
group['id'])
|
||||
|
||||
|
||||
class LDAPIdentity(test.TestCase, BaseLDAPIdentity):
|
||||
class LDAPIdentity(tests.TestCase, BaseLDAPIdentity):
|
||||
def setUp(self):
|
||||
super(LDAPIdentity, self).setUp()
|
||||
self._set_config()
|
||||
|
@ -602,8 +602,8 @@ class LDAPIdentity(test.TestCase, BaseLDAPIdentity):
|
|||
|
||||
def test_user_api_get_connection_no_user_password(self):
|
||||
"""Don't bind in case the user and password are blank."""
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf')])
|
||||
CONF.ldap.url = "fake://memory"
|
||||
user_api = identity.backends.ldap.UserApi(CONF)
|
||||
self.stubs.Set(fakeldap, 'FakeLdap',
|
||||
|
@ -830,9 +830,9 @@ class LDAPIdentity(test.TestCase, BaseLDAPIdentity):
|
|||
class LDAPIdentityEnabledEmulation(LDAPIdentity):
|
||||
def setUp(self):
|
||||
super(LDAPIdentityEnabledEmulation, self).setUp()
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_ldap.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_ldap.conf')])
|
||||
CONF.ldap.user_enabled_emulation = True
|
||||
CONF.ldap.tenant_enabled_emulation = True
|
||||
self.clear_database()
|
||||
|
@ -901,12 +901,12 @@ class LDAPIdentityEnabledEmulation(LDAPIdentity):
|
|||
"Enabled emulation conflicts with enabled mask")
|
||||
|
||||
|
||||
class LdapIdentitySqlAssignment(sql.Base, test.TestCase, BaseLDAPIdentity):
|
||||
class LdapIdentitySqlAssignment(sql.Base, tests.TestCase, BaseLDAPIdentity):
|
||||
|
||||
def _set_config(self):
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_ldap_sql.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_ldap_sql.conf')])
|
||||
|
||||
def setUp(self):
|
||||
super(LdapIdentitySqlAssignment, self).setUp()
|
||||
|
@ -942,7 +942,7 @@ class LdapIdentitySqlAssignment(sql.Base, test.TestCase, BaseLDAPIdentity):
|
|||
'N/A: Not part of SQL backend')
|
||||
|
||||
|
||||
class MultiLDAPandSQLIdentity(sql.Base, test.TestCase, BaseLDAPIdentity):
|
||||
class MultiLDAPandSQLIdentity(sql.Base, tests.TestCase, BaseLDAPIdentity):
|
||||
"""Class to test common SQL plus individual LDAP backends.
|
||||
|
||||
We define a set of domains and domain-specific backends:
|
||||
|
@ -977,7 +977,7 @@ class MultiLDAPandSQLIdentity(sql.Base, test.TestCase, BaseLDAPIdentity):
|
|||
self.opt_in_group('identity', domain_specific_drivers_enabled=True)
|
||||
self.orig_config_dir = (
|
||||
config.CONF.identity.domain_config_dir)
|
||||
self.opt_in_group('identity', domain_config_dir=test.TESTSDIR)
|
||||
self.opt_in_group('identity', domain_config_dir=tests.TESTSDIR)
|
||||
self._set_domain_configs()
|
||||
self.clear_database()
|
||||
self.load_fixtures(default_fixtures)
|
||||
|
@ -995,9 +995,9 @@ class MultiLDAPandSQLIdentity(sql.Base, test.TestCase, BaseLDAPIdentity):
|
|||
sql.set_global_engine(None)
|
||||
|
||||
def _set_config(self):
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_multi_ldap_sql.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_multi_ldap_sql.conf')])
|
||||
|
||||
def _setup_domain_test_data(self):
|
||||
|
||||
|
@ -1025,24 +1025,24 @@ class MultiLDAPandSQLIdentity(sql.Base, test.TestCase, BaseLDAPIdentity):
|
|||
# test overrides are included.
|
||||
self.identity_api.domain_configs._load_config(
|
||||
self.identity_api.assignment_api,
|
||||
[test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_multi_ldap_sql.conf'),
|
||||
test.testsdir('keystone.Default.conf')],
|
||||
[tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_multi_ldap_sql.conf'),
|
||||
tests.testsdir('keystone.Default.conf')],
|
||||
'Default')
|
||||
self.identity_api.domain_configs._load_config(
|
||||
self.identity_api.assignment_api,
|
||||
[test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_multi_ldap_sql.conf'),
|
||||
test.testsdir('keystone.domain1.conf')],
|
||||
[tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_multi_ldap_sql.conf'),
|
||||
tests.testsdir('keystone.domain1.conf')],
|
||||
'domain1')
|
||||
self.identity_api.domain_configs._load_config(
|
||||
self.identity_api.assignment_api,
|
||||
[test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_multi_ldap_sql.conf'),
|
||||
test.testsdir('keystone.domain2.conf')],
|
||||
[tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_multi_ldap_sql.conf'),
|
||||
tests.testsdir('keystone.domain2.conf')],
|
||||
'domain2')
|
||||
|
||||
def reload_backends(self, domain_id):
|
||||
|
|
|
@ -20,7 +20,7 @@ import uuid
|
|||
|
||||
import memcache
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import utils
|
||||
from keystone import exception
|
||||
|
@ -110,7 +110,7 @@ class MemcacheClient(object):
|
|||
pass
|
||||
|
||||
|
||||
class MemcacheToken(test.TestCase, test_backend.TokenTests):
|
||||
class MemcacheToken(tests.TestCase, test_backend.TokenTests):
|
||||
def setUp(self):
|
||||
super(MemcacheToken, self).setUp()
|
||||
self.load_backends()
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone.identity.backends import pam as identity_pam
|
||||
|
@ -26,12 +26,12 @@ CONF = config.CONF
|
|||
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
|
||||
|
||||
|
||||
class PamIdentity(test.TestCase):
|
||||
class PamIdentity(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(PamIdentity, self).setUp()
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_pam.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_pam.conf')])
|
||||
self.identity_api = identity_pam.PamIdentity()
|
||||
id = uuid.uuid4().hex
|
||||
self.tenant_in = {'id': id, 'name': id}
|
||||
|
|
|
@ -21,7 +21,7 @@ import sqlalchemy
|
|||
from keystone.common import sql
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import default_fixtures
|
||||
import test_backend
|
||||
|
@ -31,13 +31,13 @@ CONF = config.CONF
|
|||
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
|
||||
|
||||
|
||||
class SqlTests(test.TestCase, sql.Base):
|
||||
class SqlTests(tests.TestCase, sql.Base):
|
||||
|
||||
def setUp(self):
|
||||
super(SqlTests, self).setUp()
|
||||
self.config([test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_sql.conf')])
|
||||
self.config([tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_sql.conf')])
|
||||
|
||||
self.load_backends()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import os
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import exception
|
||||
|
||||
|
@ -28,7 +28,7 @@ DEFAULT_CATALOG_TEMPLATES = os.path.abspath(os.path.join(
|
|||
'default_catalog.templates'))
|
||||
|
||||
|
||||
class TestTemplatedCatalog(test.TestCase, test_backend.CatalogTests):
|
||||
class TestTemplatedCatalog(tests.TestCase, test_backend.CatalogTests):
|
||||
|
||||
DEFAULT_FIXTURE = {
|
||||
'RegionOne': {
|
||||
|
|
|
@ -22,7 +22,7 @@ from dogpile.cache import proxy
|
|||
from keystone.common import cache
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
|
@ -73,7 +73,7 @@ class TestProxyValue(object):
|
|||
self.cached = False
|
||||
|
||||
|
||||
class CacheRegionTest(test.TestCase):
|
||||
class CacheRegionTest(tests.TestCase):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CacheRegionTest, self).__init__(*args, **kwargs)
|
||||
self.region = None
|
||||
|
@ -182,7 +182,7 @@ class CacheRegionTest(test.TestCase):
|
|||
"bogus")
|
||||
|
||||
|
||||
class CacheNoopBackendTest(test.TestCase):
|
||||
class CacheNoopBackendTest(tests.TestCase):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CacheNoopBackendTest, self).__init__(*args, **kwargs)
|
||||
self.region = None
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import openssl
|
||||
from keystone import exception
|
||||
|
@ -29,7 +29,7 @@ import default_fixtures
|
|||
|
||||
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
SSLDIR = "%s/tests/ssl/" % ROOTDIR
|
||||
CONF = test.CONF
|
||||
CONF = tests.CONF
|
||||
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ CERTDIR = rootdir("certs")
|
|||
KEYDIR = rootdir("private")
|
||||
|
||||
|
||||
class CertSetupTestCase(test.TestCase):
|
||||
class CertSetupTestCase(tests.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(CertSetupTestCase, self).setUp()
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
|
@ -23,16 +23,16 @@ from keystone import exception
|
|||
CONF = config.CONF
|
||||
|
||||
|
||||
class ConfigTestCase(test.TestCase):
|
||||
class ConfigTestCase(tests.TestCase):
|
||||
def test_paste_config(self):
|
||||
self.assertEqual(config.find_paste_config(),
|
||||
test.etcdir('keystone-paste.ini'))
|
||||
tests.etcdir('keystone-paste.ini'))
|
||||
self.opt_in_group('paste_deploy', config_file='XYZ')
|
||||
self.assertRaises(exception.PasteConfigNotFound,
|
||||
config.find_paste_config)
|
||||
self.opt_in_group('paste_deploy', config_file='')
|
||||
self.assertEqual(config.find_paste_config(),
|
||||
test.etcdir('keystone.conf.sample'))
|
||||
tests.etcdir('keystone.conf.sample'))
|
||||
|
||||
def test_config_default(self):
|
||||
self.assertEqual('keystone.auth.plugins.password.Password',
|
||||
|
|
|
@ -20,7 +20,7 @@ import uuid
|
|||
from lxml import etree
|
||||
import webtest
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import extension
|
||||
from keystone.common import serializer
|
||||
|
@ -29,7 +29,7 @@ from keystone.openstack.common import jsonutils
|
|||
import default_fixtures
|
||||
|
||||
|
||||
class RestfulTestCase(test.TestCase):
|
||||
class RestfulTestCase(tests.TestCase):
|
||||
"""Performs restful tests against the WSGI app over HTTP.
|
||||
|
||||
This class launches public & admin WSGI servers for every test, which can
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.contrib import s3
|
||||
|
||||
from keystone import exception
|
||||
|
||||
|
||||
class S3ContribCore(test.TestCase):
|
||||
class S3ContribCore(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(S3ContribCore, self).setUp()
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
from keystone.contrib import stats
|
||||
|
||||
from keystone import config
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class StatsContribCore(test.TestCase):
|
||||
class StatsContribCore(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(StatsContribCore, self).setUp()
|
||||
self.stats_middleware = stats.StatsMiddleware(None)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import uuid
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import wsgi
|
||||
from keystone import config
|
||||
|
@ -27,7 +27,7 @@ from keystone.openstack.common import jsonutils
|
|||
CONF = config.CONF
|
||||
|
||||
|
||||
class ExceptionTestCase(test.TestCase):
|
||||
class ExceptionTestCase(tests.TestCase):
|
||||
def assertValidJsonRendering(self, e):
|
||||
resp = wsgi.render_exception(e)
|
||||
self.assertEqual(resp.status_int, e.code)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import environment
|
||||
from keystone import config
|
||||
|
@ -24,7 +24,7 @@ from keystone import config
|
|||
CONF = config.CONF
|
||||
|
||||
|
||||
class IPv6TestCase(test.TestCase):
|
||||
class IPv6TestCase(tests.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.skip_if_no_ipv6()
|
||||
|
|
|
@ -20,7 +20,7 @@ import webob
|
|||
from keystone import config
|
||||
from keystone.openstack.common import jsonutils
|
||||
from keystone.openstack.common import timeutils
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import default_fixtures
|
||||
|
||||
|
@ -30,7 +30,7 @@ OPENSTACK_REPO = 'https://review.openstack.org/p/openstack'
|
|||
KEYSTONECLIENT_REPO = '%s/python-keystoneclient.git' % OPENSTACK_REPO
|
||||
|
||||
|
||||
class CompatTestCase(test.TestCase):
|
||||
class CompatTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(CompatTestCase, self).setUp()
|
||||
|
||||
|
@ -50,7 +50,7 @@ class CompatTestCase(test.TestCase):
|
|||
self.public_server = self.serveapp('keystone', name='main')
|
||||
self.admin_server = self.serveapp('keystone', name='admin')
|
||||
|
||||
revdir = test.checkout_vendor(*self.get_checkout())
|
||||
revdir = tests.checkout_vendor(*self.get_checkout())
|
||||
self.add_path(revdir)
|
||||
self.clear_module('keystoneclient')
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from keystoneclient.contrib.ec2 import utils as ec2_utils
|
|||
|
||||
from keystone.common import sql
|
||||
from keystone import config
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_keystoneclient
|
||||
|
||||
|
@ -31,9 +31,9 @@ CONF = config.CONF
|
|||
class KcMasterSqlTestCase(test_keystoneclient.KcMasterTestCase, sql.Base):
|
||||
def config(self, config_files):
|
||||
super(KcMasterSqlTestCase, self).config([
|
||||
test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_sql.conf')])
|
||||
tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_sql.conf')])
|
||||
|
||||
self.load_backends()
|
||||
self.engine = self.get_engine()
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import webob
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone import middleware
|
||||
|
@ -44,7 +44,7 @@ def make_response(**kwargs):
|
|||
return webob.Response(body)
|
||||
|
||||
|
||||
class TokenAuthMiddlewareTest(test.TestCase):
|
||||
class TokenAuthMiddlewareTest(tests.TestCase):
|
||||
def test_request(self):
|
||||
req = make_request()
|
||||
req.headers[middleware.AUTH_TOKEN_HEADER] = 'MAGIC'
|
||||
|
@ -53,7 +53,7 @@ class TokenAuthMiddlewareTest(test.TestCase):
|
|||
self.assertEqual(context['token_id'], 'MAGIC')
|
||||
|
||||
|
||||
class AdminTokenAuthMiddlewareTest(test.TestCase):
|
||||
class AdminTokenAuthMiddlewareTest(tests.TestCase):
|
||||
def test_request_admin(self):
|
||||
req = make_request()
|
||||
req.headers[middleware.AUTH_TOKEN_HEADER] = CONF.admin_token
|
||||
|
@ -69,7 +69,7 @@ class AdminTokenAuthMiddlewareTest(test.TestCase):
|
|||
self.assertFalse(context['is_admin'])
|
||||
|
||||
|
||||
class PostParamsMiddlewareTest(test.TestCase):
|
||||
class PostParamsMiddlewareTest(tests.TestCase):
|
||||
def test_request_with_params(self):
|
||||
req = make_request(body="arg1=one", method='POST')
|
||||
middleware.PostParamsMiddleware(None).process_request(req)
|
||||
|
@ -77,7 +77,7 @@ class PostParamsMiddlewareTest(test.TestCase):
|
|||
self.assertEqual(params, {"arg1": "one"})
|
||||
|
||||
|
||||
class JsonBodyMiddlewareTest(test.TestCase):
|
||||
class JsonBodyMiddlewareTest(tests.TestCase):
|
||||
def test_request_with_params(self):
|
||||
req = make_request(body='{"arg1": "one", "arg2": ["a"]}',
|
||||
content_type='application/json',
|
||||
|
@ -115,7 +115,7 @@ class JsonBodyMiddlewareTest(test.TestCase):
|
|||
self.assertEqual(params, {})
|
||||
|
||||
|
||||
class XmlBodyMiddlewareTest(test.TestCase):
|
||||
class XmlBodyMiddlewareTest(tests.TestCase):
|
||||
def test_client_wants_xml_back(self):
|
||||
"""Clients requesting XML should get what they ask for."""
|
||||
body = '{"container": {"attribute": "value"}}'
|
||||
|
|
|
@ -17,23 +17,23 @@
|
|||
import os
|
||||
import webtest
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
def _generate_paste_config():
|
||||
# Generate a file, based on keystone-paste.ini, that doesn't include
|
||||
# admin_token_auth in the pipeline
|
||||
|
||||
with open(test.etcdir('keystone-paste.ini'), 'r') as f:
|
||||
with open(tests.etcdir('keystone-paste.ini'), 'r') as f:
|
||||
contents = f.read()
|
||||
|
||||
new_contents = contents.replace(' admin_token_auth ', ' ')
|
||||
|
||||
with open(test.tmpdir('no_admin_token_auth-paste.ini'), 'w') as f:
|
||||
with open(tests.tmpdir('no_admin_token_auth-paste.ini'), 'w') as f:
|
||||
f.write(new_contents)
|
||||
|
||||
|
||||
class TestNoAdminTokenAuth(test.TestCase):
|
||||
class TestNoAdminTokenAuth(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(TestNoAdminTokenAuth, self).setUp()
|
||||
self.load_backends()
|
||||
|
@ -41,12 +41,12 @@ class TestNoAdminTokenAuth(test.TestCase):
|
|||
_generate_paste_config()
|
||||
|
||||
self.admin_app = webtest.TestApp(
|
||||
self.loadapp(test.tmpdir('no_admin_token_auth'), name='admin'),
|
||||
self.loadapp(tests.tmpdir('no_admin_token_auth'), name='admin'),
|
||||
extra_environ=dict(REMOTE_ADDR='127.0.0.1'))
|
||||
|
||||
def tearDown(self):
|
||||
self.admin_app = None
|
||||
os.remove(test.tmpdir('no_admin_token_auth-paste.ini'))
|
||||
os.remove(tests.tmpdir('no_admin_token_auth-paste.ini'))
|
||||
super(TestNoAdminTokenAuth, self).tearDown()
|
||||
|
||||
def test_request_no_admin_token_auth(self):
|
||||
|
|
|
@ -18,7 +18,7 @@ import uuid
|
|||
|
||||
from keystone import notifications
|
||||
from keystone.openstack.common.notifier import api as notifier_api
|
||||
from keystone.tests import core
|
||||
from keystone import tests
|
||||
|
||||
|
||||
EXP_RESOURCE_TYPE = uuid.uuid4().hex
|
||||
|
@ -28,7 +28,7 @@ class ArbitraryException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
class NotificationsWrapperTestCase(core.TestCase):
|
||||
class NotificationsWrapperTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(NotificationsWrapperTestCase, self).setUp()
|
||||
|
||||
|
@ -116,7 +116,7 @@ class NotificationsWrapperTestCase(core.TestCase):
|
|||
self.assertFalse(self.send_notification_called)
|
||||
|
||||
|
||||
class NotificationsTestCase(core.TestCase):
|
||||
class NotificationsTestCase(tests.TestCase):
|
||||
def test_send_notification(self):
|
||||
"""Test the private method _send_notification to ensure event_type,
|
||||
payload, and context are built and passed properly.
|
||||
|
|
|
@ -19,7 +19,7 @@ import StringIO
|
|||
import tempfile
|
||||
import urllib2
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
|
@ -30,7 +30,7 @@ from keystone.policy.backends import rules
|
|||
CONF = config.CONF
|
||||
|
||||
|
||||
class PolicyFileTestCase(test.TestCase):
|
||||
class PolicyFileTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(PolicyFileTestCase, self).setUp()
|
||||
self.orig_policy_file = CONF.policy_file
|
||||
|
@ -58,7 +58,7 @@ class PolicyFileTestCase(test.TestCase):
|
|||
empty_credentials, action, self.target)
|
||||
|
||||
|
||||
class PolicyTestCase(test.TestCase):
|
||||
class PolicyTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(PolicyTestCase, self).setUp()
|
||||
rules.reset()
|
||||
|
@ -155,7 +155,7 @@ class PolicyTestCase(test.TestCase):
|
|||
rules.enforce(admin_credentials, uppercase_action, self.target)
|
||||
|
||||
|
||||
class DefaultPolicyTestCase(test.TestCase):
|
||||
class DefaultPolicyTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(DefaultPolicyTestCase, self).setUp()
|
||||
rules.reset()
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
import copy
|
||||
|
||||
from keystone.common import serializer
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
class XmlSerializerTestCase(test.TestCase):
|
||||
class XmlSerializerTestCase(tests.TestCase):
|
||||
def assertSerializeDeserialize(self, d, xml, xmlns=None):
|
||||
self.assertEqualXML(
|
||||
serializer.to_xml(copy.deepcopy(d), xmlns),
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
import webob
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
|
@ -24,7 +24,7 @@ CONF = config.CONF
|
|||
MAX_REQUEST_BODY_SIZE = CONF.max_request_body_size
|
||||
|
||||
|
||||
class TestRequestBodySizeLimiter(test.TestCase):
|
||||
class TestRequestBodySizeLimiter(tests.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(TestRequestBodySizeLimiter, self).setUp()
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
|
||||
from keystone.common import sql
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
class CallbackMonitor:
|
||||
|
@ -46,7 +46,7 @@ class CallbackMonitor:
|
|||
self._complete = True
|
||||
|
||||
|
||||
class TestGlobalEngine(test.TestCase):
|
||||
class TestGlobalEngine(tests.TestCase):
|
||||
|
||||
def tearDown(self):
|
||||
sql.set_global_engine(None)
|
||||
|
@ -141,7 +141,7 @@ class TestGlobalEngine(test.TestCase):
|
|||
cb_mon2.check()
|
||||
|
||||
|
||||
class TestBase(test.TestCase):
|
||||
class TestBase(tests.TestCase):
|
||||
|
||||
def tearDown(self):
|
||||
sql.set_global_engine(None)
|
||||
|
|
|
@ -32,7 +32,7 @@ import uuid
|
|||
from migrate.versioning import api as versioning_api
|
||||
import sqlalchemy
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import sql
|
||||
from keystone.common.sql import migration
|
||||
|
@ -48,14 +48,14 @@ CONF = config.CONF
|
|||
DEFAULT_DOMAIN_ID = CONF.identity.default_domain_id
|
||||
|
||||
|
||||
class SqlMigrateBase(test.TestCase):
|
||||
class SqlMigrateBase(tests.TestCase):
|
||||
def initialize_sql(self):
|
||||
self.metadata = sqlalchemy.MetaData()
|
||||
self.metadata.bind = self.engine
|
||||
|
||||
_config_file_list = [test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_sql.conf')]
|
||||
_config_file_list = [tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_sql.conf')]
|
||||
|
||||
#override this to specify the complete list of configuration files
|
||||
def config_files(self):
|
||||
|
|
|
@ -18,22 +18,22 @@
|
|||
import os
|
||||
import ssl
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import environment
|
||||
from keystone import config
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
CERTDIR = test.rootdir("examples/pki/certs")
|
||||
KEYDIR = test.rootdir("examples/pki/private")
|
||||
CERTDIR = tests.rootdir("examples/pki/certs")
|
||||
KEYDIR = tests.rootdir("examples/pki/private")
|
||||
CERT = os.path.join(CERTDIR, 'ssl_cert.pem')
|
||||
KEY = os.path.join(KEYDIR, 'ssl_key.pem')
|
||||
CA = os.path.join(CERTDIR, 'cacert.pem')
|
||||
CLIENT = os.path.join(CERTDIR, 'middleware.pem')
|
||||
|
||||
|
||||
class SSLTestCase(test.TestCase):
|
||||
class SSLTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(SSLTestCase, self).setUp()
|
||||
self.load_backends()
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
from keystone.common import wsgi
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
@ -30,7 +30,7 @@ ANY = 'any'
|
|||
ALL_TOKENS = [TOKEN_BIND_KERB, TOKEN_BIND_UNKNOWN, TOKEN_BIND_NONE]
|
||||
|
||||
|
||||
class BindTest(test.TestCase):
|
||||
class BindTest(tests.TestCase):
|
||||
"""Test binding tokens to a Principal.
|
||||
|
||||
Even though everything in this file references kerberos the same concepts
|
||||
|
|
|
@ -18,7 +18,7 @@ import datetime
|
|||
|
||||
from keystone import exception
|
||||
from keystone.openstack.common import timeutils
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
from keystone import token
|
||||
|
||||
FUTURE_DELTA = datetime.timedelta(seconds=86400)
|
||||
|
@ -690,7 +690,7 @@ SAMPLE_MALFORMED_TOKEN = {
|
|||
}
|
||||
|
||||
|
||||
class TestTokenProvider(test.TestCase):
|
||||
class TestTokenProvider(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(TestTokenProvider, self).setUp()
|
||||
self.load_backends()
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
import webob
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import middleware
|
||||
|
||||
|
@ -29,7 +29,7 @@ class FakeApp(object):
|
|||
return resp(env, start_response)
|
||||
|
||||
|
||||
class UrlMiddlewareTest(test.TestCase):
|
||||
class UrlMiddlewareTest(tests.TestCase):
|
||||
def setUp(self):
|
||||
self.middleware = middleware.NormalizingFilter(FakeApp())
|
||||
self.response_status = None
|
||||
|
|
|
@ -34,7 +34,7 @@ import functools
|
|||
import os
|
||||
import time
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone.common import utils
|
||||
|
||||
|
@ -61,7 +61,7 @@ def timezone(func):
|
|||
return wrapper
|
||||
|
||||
|
||||
class UtilsTestCase(test.TestCase):
|
||||
class UtilsTestCase(tests.TestCase):
|
||||
def test_hash(self):
|
||||
password = 'right'
|
||||
wrong = 'wrongwrong' # Two wrongs don't make a right
|
||||
|
|
|
@ -26,7 +26,7 @@ from keystone.common import serializer
|
|||
from keystone import config
|
||||
from keystone.openstack.common import timeutils
|
||||
from keystone.policy.backends import rules
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_content_types
|
||||
|
||||
|
@ -38,25 +38,25 @@ TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
|
|||
|
||||
|
||||
class RestfulTestCase(test_content_types.RestfulTestCase):
|
||||
_config_file_list = [test.etcdir('keystone.conf.sample'),
|
||||
test.testsdir('test_overrides.conf'),
|
||||
test.testsdir('backend_sql.conf'),
|
||||
test.testsdir('backend_sql_disk.conf')]
|
||||
_config_file_list = [tests.etcdir('keystone.conf.sample'),
|
||||
tests.testsdir('test_overrides.conf'),
|
||||
tests.testsdir('backend_sql.conf'),
|
||||
tests.testsdir('backend_sql_disk.conf')]
|
||||
|
||||
#override this to sepcify the complete list of configuration files
|
||||
def config_files(self):
|
||||
return self._config_file_list
|
||||
|
||||
def setup_database(self):
|
||||
test.setup_test_database()
|
||||
tests.setup_test_database()
|
||||
|
||||
def teardown_database(self):
|
||||
test.teardown_test_database()
|
||||
tests.teardown_test_database()
|
||||
|
||||
def generate_paste_config(self):
|
||||
new_paste_file = None
|
||||
try:
|
||||
new_paste_file = test.generate_paste_config(self.EXTENSION_TO_ADD)
|
||||
new_paste_file = tests.generate_paste_config(self.EXTENSION_TO_ADD)
|
||||
except AttributeError:
|
||||
# no need to report this error here, as most tests will not have
|
||||
# EXTENSION_TO_ADD defined.
|
||||
|
@ -66,7 +66,7 @@ class RestfulTestCase(test_content_types.RestfulTestCase):
|
|||
|
||||
def remove_generated_paste_config(self):
|
||||
try:
|
||||
test.remove_generated_paste_config(self.EXTENSION_TO_ADD)
|
||||
tests.remove_generated_paste_config(self.EXTENSION_TO_ADD)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from keystone import auth
|
|||
from keystone.common import cms
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_v3
|
||||
|
||||
|
@ -98,7 +98,7 @@ class TestAuthInfo(test_v3.RestfulTestCase):
|
|||
class TestPKITokenAPIs(test_v3.RestfulTestCase):
|
||||
def config_files(self):
|
||||
conf_files = super(TestPKITokenAPIs, self).config_files()
|
||||
conf_files.append(test.testsdir('test_pki_token_provider.conf'))
|
||||
conf_files.append(tests.testsdir('test_pki_token_provider.conf'))
|
||||
return conf_files
|
||||
|
||||
def setUp(self):
|
||||
|
@ -334,7 +334,7 @@ class TestPKITokenAPIs(test_v3.RestfulTestCase):
|
|||
class TestUUIDTokenAPIs(TestPKITokenAPIs):
|
||||
def config_files(self):
|
||||
conf_files = super(TestUUIDTokenAPIs, self).config_files()
|
||||
conf_files.append(test.testsdir('test_uuid_token_provider.conf'))
|
||||
conf_files.append(tests.testsdir('test_uuid_token_provider.conf'))
|
||||
return conf_files
|
||||
|
||||
def test_v3_token_id(self):
|
||||
|
|
|
@ -22,7 +22,7 @@ from keystone import config
|
|||
from keystone import exception
|
||||
from keystone.openstack.common import jsonutils
|
||||
from keystone.policy.backends import rules
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
import test_v3
|
||||
|
||||
|
@ -471,7 +471,7 @@ class IdentityTestv3CloudPolicySample(test_v3.RestfulTestCase):
|
|||
# Finally, switch to the v3 sample policy file
|
||||
self.orig_policy_file = CONF.policy_file
|
||||
rules.reset()
|
||||
self.opt(policy_file=test.etcdir('policy.v3cloudsample.json'))
|
||||
self.opt(policy_file=tests.etcdir('policy.v3cloudsample.json'))
|
||||
|
||||
def tearDown(self):
|
||||
super(IdentityTestv3CloudPolicySample, self).tearDown()
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
from keystone import config
|
||||
from keystone import controllers
|
||||
|
@ -110,7 +110,7 @@ VERSIONS_RESPONSE = {
|
|||
}
|
||||
|
||||
|
||||
class VersionTestCase(test.TestCase):
|
||||
class VersionTestCase(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(VersionTestCase, self).setUp()
|
||||
self.load_backends()
|
||||
|
@ -258,7 +258,7 @@ class VersionTestCase(test.TestCase):
|
|||
self.assertEqual(data, v2_only_response)
|
||||
|
||||
|
||||
class XmlVersionTestCase(test.TestCase):
|
||||
class XmlVersionTestCase(tests.TestCase):
|
||||
|
||||
REQUEST_HEADERS = {'Accept': 'application/xml'}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ from keystone.common import wsgi
|
|||
from keystone import exception
|
||||
from keystone.openstack.common import gettextutils
|
||||
from keystone.openstack.common import jsonutils
|
||||
from keystone.tests import core as test
|
||||
from keystone import tests
|
||||
|
||||
|
||||
class FakeApp(wsgi.Application):
|
||||
|
@ -31,7 +31,7 @@ class FakeApp(wsgi.Application):
|
|||
return {'a': 'b'}
|
||||
|
||||
|
||||
class BaseWSGITest(test.TestCase):
|
||||
class BaseWSGITest(tests.TestCase):
|
||||
def setUp(self):
|
||||
self.app = FakeApp()
|
||||
super(BaseWSGITest, self).setUp()
|
||||
|
@ -186,7 +186,7 @@ class MiddlewareTest(BaseWSGITest):
|
|||
self.assertEquals("test", app.kwargs["testkey"])
|
||||
|
||||
|
||||
class WSGIFunctionTest(test.TestCase):
|
||||
class WSGIFunctionTest(tests.TestCase):
|
||||
def test_mask_password(self):
|
||||
message = ("test = 'password': 'aaaaaa', 'param1': 'value1', "
|
||||
"\"new_password\": 'bbbbbb'")
|
||||
|
@ -219,7 +219,7 @@ class WSGIFunctionTest(test.TestCase):
|
|||
'test = "param1" : "value"')
|
||||
|
||||
|
||||
class LocalizedResponseTest(test.TestCase):
|
||||
class LocalizedResponseTest(tests.TestCase):
|
||||
def setUp(self):
|
||||
super(LocalizedResponseTest, self).setUp()
|
||||
gettextutils._AVAILABLE_LANGUAGES = []
|
||||
|
|
Loading…
Reference in New Issue