mistral.tests.unit.api package

Submodules

mistral.tests.unit.api.base module

class mistral.tests.unit.api.base.APITest(*args, **kwds)

Bases: mistral.tests.unit.base.DbTestCase

assertNotFound(url)
assertUnauthorized(url)
setUp()

mistral.tests.unit.api.test_access_control module

class mistral.tests.unit.api.test_access_control.PolicyTestCase(*args, **kwds)

Bases: mistral.tests.unit.base.BaseTest

Tests whether the configuration of the policy engine is corect.

setUp()
test_admin_api_allowed()
test_admin_api_disallowed()
test_admin_or_owner_api_allowed()
test_admin_or_owner_api_disallowed()

mistral.tests.unit.api.test_auth module

class mistral.tests.unit.api.test_auth.TestKeystoneMiddleware(*args, **kwds)

Bases: mistral.tests.unit.api.base.APITest

Test keystone middleware AuthProtocol.

It checks that keystone middleware AuthProtocol is executed when enabled.

setUp()

mistral.tests.unit.api.test_cors_middleware module

Tests cors middleware.

class mistral.tests.unit.api.test_cors_middleware.TestCORSMiddleware(*args, **kwds)

Bases: mistral.tests.unit.api.base.APITest

Provide a basic smoke test to ensure CORS middleware is active.

The tests below provide minimal confirmation that the CORS middleware is active, and may be configured. For comprehensive tests, please consult the test suite in oslo_middleware.

setUp()
test_invalid_cors_get_request()
test_invalid_cors_options_request()
test_valid_cors_get_request()
test_valid_cors_options_request()

mistral.tests.unit.api.test_service module

class mistral.tests.unit.api.test_service.TestWSGIService(*args, **kwds)

Bases: mistral.tests.unit.base.BaseTest

test_workers_set_correct_setting(*args, **keywargs)
test_workers_set_default(*args, **keywargs)
test_workers_set_zero_setting(*args, **keywargs)
test_wsgi_service_with_ssl_enabled(*args, **keywargs)

Module contents