keystonemiddleware.tests.unit package¶
Subpackages¶
- keystonemiddleware.tests.unit.audit package
- Submodules
- keystonemiddleware.tests.unit.audit.base module
- keystonemiddleware.tests.unit.audit.test_audit_api module
- keystonemiddleware.tests.unit.audit.test_audit_middleware module
- keystonemiddleware.tests.unit.audit.test_audit_oslo_messaging module
- keystonemiddleware.tests.unit.audit.test_logging_notifier module
- Module contents
- keystonemiddleware.tests.unit.auth_token package
- Submodules
- keystonemiddleware.tests.unit.auth_token.base module
- keystonemiddleware.tests.unit.auth_token.test_auth module
- keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware module
- keystonemiddleware.tests.unit.auth_token.test_base_middleware module
- keystonemiddleware.tests.unit.auth_token.test_cache module
- keystonemiddleware.tests.unit.auth_token.test_config module
- keystonemiddleware.tests.unit.auth_token.test_connection_pool module
- keystonemiddleware.tests.unit.auth_token.test_memcache_crypt module
- keystonemiddleware.tests.unit.auth_token.test_request module
- keystonemiddleware.tests.unit.auth_token.test_revocations module
- keystonemiddleware.tests.unit.auth_token.test_signing_dir module
- keystonemiddleware.tests.unit.auth_token.test_user_auth_plugin module
- Module contents
Submodules¶
keystonemiddleware.tests.unit.client_fixtures module¶
-
class
keystonemiddleware.tests.unit.client_fixtures.
Examples
¶ Bases:
fixtures.fixture.Fixture
Example tokens and certs loaded from the examples directory.
To use this class correctly, the module needs to override the test suite class to use testresources.OptimisingTestSuite (otherwise the files will be read on every test). This is done by defining a load_tests function in the module, like this:
- def load_tests(loader, tests, pattern):
- return testresources.OptimisingTestSuite(tests)
(see http://docs.python.org/2/library/unittest.html#load-tests-protocol )
-
setUp
()¶
keystonemiddleware.tests.unit.test_ec2_token_middleware module¶
-
class
keystonemiddleware.tests.unit.test_ec2_token_middleware.
EC2TokenMiddlewareTestBad
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.test_ec2_token_middleware.EC2TokenMiddlewareTestBase
-
test_communication_failure
(*args, **keywargs)¶
-
test_no_key_id
()¶
-
test_no_result_data
(*args, **keywargs)¶
-
test_no_signature
()¶
-
-
class
keystonemiddleware.tests.unit.test_ec2_token_middleware.
EC2TokenMiddlewareTestBase
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.TestCase
-
TEST_HOST
= 'fakehost'¶
-
TEST_PORT
= 35357¶
-
TEST_PROTOCOL
= 'https'¶
-
TEST_URL
= 'https://fakehost:35357/v2.0/ec2tokens'¶
-
setUp
()¶
-
-
class
keystonemiddleware.tests.unit.test_ec2_token_middleware.
EC2TokenMiddlewareTestGood
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.test_ec2_token_middleware.EC2TokenMiddlewareTestBase
-
test_protocol_old_versions
(*args, **keywargs)¶
-
test_protocol_v4
(*args, **keywargs)¶
-
-
class
keystonemiddleware.tests.unit.test_ec2_token_middleware.
FakeApp
¶ Bases:
object
This represents a WSGI app protected by the auth_token middleware.
keystonemiddleware.tests.unit.test_entry_points module¶
-
class
keystonemiddleware.tests.unit.test_entry_points.
TestPasteDeploymentEntryPoints
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.BaseTestCase
-
test_entry_points
()¶
-
keystonemiddleware.tests.unit.test_fixtures module¶
-
class
keystonemiddleware.tests.unit.test_fixtures.
AuthTokenFixtureTest
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.auth_token.test_auth_token_middleware.BaseAuthTokenMiddlewareTest
-
setUp
()¶
-
test_auth_token_fixture_expired_token
()¶
-
test_auth_token_fixture_invalid_token
()¶
-
test_auth_token_fixture_valid_token
()¶
-
keystonemiddleware.tests.unit.test_opts module¶
-
class
keystonemiddleware.tests.unit.test_opts.
OptsTestCase
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.TestCase
-
test_entry_point
()¶
-
test_list_auth_token_opts
()¶
-
test_original_list_all_options
()¶
-
keystonemiddleware.tests.unit.test_s3_token_middleware module¶
-
class
keystonemiddleware.tests.unit.test_s3_token_middleware.
FakeApp
¶ Bases:
object
This represents a WSGI app protected by the auth_token middleware.
-
class
keystonemiddleware.tests.unit.test_s3_token_middleware.
S3TokenMiddlewareTestBad
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.test_s3_token_middleware.S3TokenMiddlewareTestBase
-
setUp
()¶
-
test_bad_reply
()¶
-
test_fail_to_connect_to_keystone
()¶
-
-
class
keystonemiddleware.tests.unit.test_s3_token_middleware.
S3TokenMiddlewareTestBase
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.TestCase
-
TEST_AUTH_URI
= 'https://fakehost/identity'¶
-
TEST_URL
= 'https://fakehost/identity/v2.0/s3tokens'¶
-
setUp
()¶
-
start_fake_response
(status, headers)¶
-
-
class
keystonemiddleware.tests.unit.test_s3_token_middleware.
S3TokenMiddlewareTestGood
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.test_s3_token_middleware.S3TokenMiddlewareTestBase
-
setUp
()¶
-
test_insecure
(*args, **keywargs)¶
-
test_insecure_option
()¶
-
test_no_path_request
()¶
-
test_unicode_path
()¶
-
test_without_auth_storage_token
()¶
-
keystonemiddleware.tests.unit.utils module¶
-
class
keystonemiddleware.tests.unit.utils.
BaseTestCase
(*args, **kwds)¶ Bases:
oslotest.base.BaseTestCase
-
setUp
()¶
-
-
class
keystonemiddleware.tests.unit.utils.
DisableModuleFixture
(module, *args, **kw)¶ Bases:
fixtures.fixture.Fixture
A fixture to provide support for unloading/disabling modules.
-
clear_module
()¶
-
setUp
()¶ Ensure ImportError for the specified module.
-
tearDown
()¶
-
-
class
keystonemiddleware.tests.unit.utils.
MiddlewareTestCase
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.BaseTestCase
-
create_app
(*args, **kwargs)¶
-
create_middleware
(cb, **kwargs)¶
-
create_simple_app
(*args, **kwargs)¶
-
create_simple_middleware
(status='200 OK', body='', headers=None, **kwargs)¶
-
-
class
keystonemiddleware.tests.unit.utils.
NoModuleFinder
(module)¶ Bases:
object
Disallow further imports of ‘module’.
-
find_module
(fullname, path)¶
-
-
class
keystonemiddleware.tests.unit.utils.
TestCase
(*args, **kwds)¶ Bases:
keystonemiddleware.tests.unit.utils.BaseTestCase
-
TEST_DOMAIN_ID
= '1'¶
-
TEST_DOMAIN_NAME
= 'aDomain'¶
-
TEST_GROUP_ID
= 'de017f50082b45fabaad6465d6e015ff'¶
-
TEST_ROLE_ID
= '23d921773f424b8c8c82d59aecf79c5e'¶
-
TEST_ROOT_URL
= 'http://127.0.0.1:5000/'¶
-
TEST_TENANT_ID
= '1'¶
-
TEST_TENANT_NAME
= 'aTenant'¶
-
TEST_TOKEN
= 'aToken'¶
-
TEST_TRUST_ID
= 'aTrust'¶
-
TEST_USER
= 'test'¶
-
TEST_USER_ID
= '81e220bc2a944bebb8efb10722401875'¶
-
setUp
()¶
-
tearDown
()¶
-