¡@

Home 

OpenStack Study: glance

OpenStack Index

Previous

Next

class BaseCacheMiddlewareTest(object):

    def test_cache_middleware_transparent_v1(self):

    def test_cache_middleware_transparent_v2(self):

    def test_cache_remote_image(self):

    def test_cache_middleware_trans_v1_without_download_image_policy(self):

    def test_cache_middleware_trans_v2_without_download_image_policy(self):

class BaseCacheManageMiddlewareTest(object):

    def verify_no_images(self):

    def add_image(self, name):

    def verify_no_cached_images(self):

    def test_user_not_authorized(self):

    def test_cache_manage_get_cached_images(self):

    def test_cache_manage_delete_cached_images(self):

    def test_cache_manage_delete_queued_images(self):

    def test_queue_and_prefetch(self):

class TestImageCacheXattr(functional.FunctionalTest, BaseCacheMiddlewareTest):

    def setUp(self):

    def tearDown(self):

class TestImageCacheManageXattr(functional.FunctionalTest, BaseCacheManageMiddlewareTest):

    def setUp(self):

    def tearDown(self):

class TestImageCacheSqlite(functional.FunctionalTest, BaseCacheMiddlewareTest):

    def setUp(self):

    def tearDown(self):

class TestImageCacheManageSqlite(functional.FunctionalTest, BaseCacheManageMiddlewareTest):

    def setUp(self):

    def tearDown(self):

\OpenStack\glance-2014.1\glance\tests\functional\test_client_exceptions.py

class ExceptionTestApp(object):

    def __call__(self, request):

class TestClientExceptions(functional.FunctionalTest):

    def setUp(self):

    def _do_test_exception(self, path, exc_type):

    def test_rate_limited(self):

    def test_rate_limited_retry(self):

    def test_service_unavailable(self):

    def test_service_unavailable_retry(self):

    def test_expectation_failed(self):

    def test_server_error(self):

    def test_server_traceback(self):

\OpenStack\glance-2014.1\glance\tests\functional\test_client_redirects.py

def RedirectTestApp(name):

class TestClientRedirects(functional.FunctionalTest):

    def setUp(self):

    def test_get_without_redirect(self):

    def test_get_with_one_redirect(self):

    def test_get_with_one_redirect_query_string(self):

    def test_get_with_max_redirects(self):

    def test_post_redirect(self):

    def test_redirect_to_new_host(self):

\OpenStack\glance-2014.1\glance\tests\functional\test_glance_manage.py

class TestGlanceManage(functional.FunctionalTest):

    def setUp(self):

    def _sync_db(self, auto_create):

    def _assert_tables(self):

    def test_db_creation(self):

    def test_db_creation_auto_create_overridden(self):

\OpenStack\glance-2014.1\glance\tests\functional\test_gzip_middleware.py

class GzipMiddlewareTest(functional.FunctionalTest):

    def test_gzip_requests(self):

        def request(path, headers=None):

\OpenStack\glance-2014.1\glance\tests\functional\test_logging.py

class TestLogging(functional.FunctionalTest):

    def test_verbose_debug(self):

    def test_no_verbose_no_debug(self):

    def assertNotEmptyFile(self, path):

    def test_logrotate(self):

\OpenStack\glance-2014.1\glance\tests\functional\test_scrubber.py

class TestScrubber(functional.FunctionalTest):

    def test_delayed_delete(self):

    def test_scrubber_app(self):

    def test_scrubber_app_against_swift(self):

    def test_scrubber_with_metadata_enc(self):

    def test_scrubber_handles_swift_missing(self):

    def test_scrubber_delete_handles_exception(self):

    def wait_for_scrub(self, path):

\OpenStack\glance-2014.1\glance\tests\functional\test_sqlite.py

class TestSqlite(functional.FunctionalTest):

    def test_big_int_mapping(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\test_api.py

class TestApi(functional.FunctionalTest):

    def test_get_head_simple_post(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\test_copy_to_file.py

class TestCopyToFile(functional.FunctionalTest):

    def _do_test_copy_from(self, from_store, get_uri):

        def _await_status(expected_status):

    def test_copy_from_http_store(self):

    def _do_test_copy_from_http(self, exists):

        def _await_status(expected_status):

    def test_copy_from_http_exists(self):

    def test_copy_from_http_nonexistent(self):

    def test_copy_from_file(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\test_misc.py

class TestMiscellaneous(functional.FunctionalTest):

    def setUp(self):

    def test_api_response_when_image_deleted_from_filesystem(self):

    def test_exception_not_eaten_from_registry_to_api(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\test_multiprocessing.py

class TestMultiprocessing(functional.FunctionalTest):

    def setUp(self):

    def test_multiprocessing(self):

    def _get_children(self):

    def test_interrupt_avoids_respawn_storm(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\test_ssl.py

class TestSSL(functional.FunctionalTest):

    def setUp(self):

    def tearDown(self):

    def test_get_head_simple_post(self):

    def test_queued_process_flow(self):

    def test_version_variations(self):

    def test_size_greater_2G_mysql(self):

    def test_traceback_not_consumed(self):

    def test_filtered_images(self):

    def test_limited_images(self):

    def test_ordered_images(self):

    def test_duplicate_image_upload(self):

    def test_delete_not_existing(self):

\OpenStack\glance-2014.1\glance\tests\functional\v1\__init__.py

\OpenStack\glance-2014.1\glance\tests\functional\v2\test_images.py

class TestImages(functional.FunctionalTest):

    def setUp(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def test_image_lifecycle(self):

        def _verify_image_checksum_and_status(checksum, status):

    def test_permissions(self):

    def test_property_protections_with_roles(self):

    def test_property_protections_with_policies(self):

    def test_property_protections_special_chars_roles(self):

    def test_property_protections_special_chars_policies(self):

    def test_tag_lifecycle(self):

    def test_images_container(self):

    def test_image_visibility_to_different_users(self):

        def list_images(tenant, role='', visibility=None):

    def test_update_locations(self):

class TestImageDirectURLVisibility(functional.FunctionalTest):

    def setUp(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def test_v2_not_enabled(self):

    def test_v2_enabled(self):

    def test_image_direct_url_visible(self):

    def test_image_multiple_location_url_visible(self):

    def test_image_direct_url_not_visible(self):

class TestImageLocationSelectionStrategy(functional.FunctionalTest):

    def setUp(self):

    def tearDown(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def test_image_locations_with_order_strategy(self):

    def test_image_locatons_with_store_type_strategy(self):

class TestImageMembers(functional.FunctionalTest):

    def setUp(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def test_image_member_lifecycle(self):

        def get_header(tenant, role=''):

class TestQuotas(functional.FunctionalTest):

    def setUp(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def _upload_image_test(self, data_src, expected_status):

    def test_image_upload_under_quota(self):

    def test_image_upload_exceed_quota(self):

    def test_chunked_image_upload_under_quota(self):

        def data_gen():

    def test_chunked_image_upload_exceed_quota(self):

        def data_gen():

\OpenStack\glance-2014.1\glance\tests\functional\v2\test_schemas.py

class TestSchemas(functional.FunctionalTest):

    def setUp(self):

    def test_resource(self):

\OpenStack\glance-2014.1\glance\tests\functional\v2\test_tasks.py

class TestTasks(functional.FunctionalTest):

    def setUp(self):

    def _url(self, path):

    def _headers(self, custom_headers=None):

    def _stash_file(self):

    def test_task_lifecycle(self):

\OpenStack\glance-2014.1\glance\tests\functional\v2\__init__.py

\OpenStack\glance-2014.1\glance\tests\functional\__init__.py

class Server(object):

    def __init__(self, test_dir, port, sock=None):

    def write_conf(self, **kwargs):

        def override_conf(filepath, overridden):

    def start(self, expect_exit=True, expected_exitcode=0, **kwargs):

    def reload(self, expect_exit=True, expected_exitcode=0, **kwargs):

    def create_database(self):

    def stop(self):

    def dump_log(self, name):

class ApiServer(Server):

    def __init__(self, test_dir, port, policy_file, delayed_delete=False, pid_file=None, sock=None, **kwargs):

class RegistryServer(Server):

    def __init__(self, test_dir, port, sock=None):

class ScrubberDaemon(Server):

    def __init__(self, test_dir, daemon=False, **kwargs):

    def start(self, expect_exit=True, expected_exitcode=0, **kwargs):

class FunctionalTest(test_utils.BaseTestCase):

    def setUp(self):

    def tearDown(self):

    def set_policy_rules(self, rules):

    def _reset_database(self, conn_string):

    def cleanup(self):

    def start_server(self, server, expect_launch, expect_exit=True, expected_exitcode=0, **kwargs):

    def start_with_retry(self, server, port_name, max_retries, expect_launch=True, **kwargs):

    def start_servers(self, **kwargs):

    def ping_server(self, port):

    def wait_for_servers(self, servers, expect_launch=True, timeout=10):

    def reload_server(self, server, expect_launch, expect_exit=True, expected_exitcode=0, **kwargs):

    def stop_server(self, server, name):

    def stop_servers(self):

    def run_sql_cmd(self, sql):

    def copy_data_file(self, file_name, dst_dir):

    def add_log_details(self, servers=None):

\OpenStack\glance-2014.1\glance\tests\integration\legacy_functional\base.py

class ApiTest(test_utils.BaseTestCase):

    def setUp(self):

    def _setup_property_protection(self):

    def _configure_logging(self):

    def _setup_database(self):

    def _setup_stores(self):

    def _load_paste_app(self, name, flavor, conf):

    def _connect_registry_client(self):

        def get_connection_type(self2):

    def tearDown(self):

\OpenStack\glance-2014.1\glance\tests\integration\legacy_functional\test_v1_api.py

class TestApi(base.ApiTest):

    def test_get_head_simple_post(self):

    def test_queued_process_flow(self):

    def test_size_greater_2G_mysql(self):

    def test_v1_not_enabled(self):

    def test_v1_enabled(self):

    def test_zero_initial_size(self):

    def test_traceback_not_consumed(self):

    def test_filtered_images(self):

    def test_limited_images(self):

    def test_ordered_images(self):

    def test_duplicate_image_upload(self):

    def test_delete_not_existing(self):

    def _do_test_post_image_content_bad_format(self, format):

    def test_post_image_content_bad_container_format(self):

    def test_post_image_content_bad_disk_format(self):

    def _do_test_put_image_content_missing_format(self, format):

    def test_put_image_content_bad_container_format(self):

    def test_put_image_content_bad_disk_format(self):

    def _do_test_mismatched_attribute(self, attribute, value):

    def test_mismatched_size(self):

    def test_mismatched_checksum(self):

class TestApiWithFakeAuth(base.ApiTest):

    def __init__(self, *args, **kwargs):

    def test_ownership(self):

    def test_image_visibility_to_different_users(self):

        def list_images(tenant, role='', is_public=None):

    def test_property_protections(self):

    def test_property_protections_special_chars(self):

\OpenStack\glance-2014.1\glance\tests\integration\legacy_functional\__init__.py

\OpenStack\glance-2014.1\glance\tests\integration\v2\base.py

class ApiTest(test_utils.BaseTestCase):

    def setUp(self):

    def _setup_property_protection(self):

    def _configure_logging(self):

    def _setup_database(self):

    def _setup_stores(self):

    def _load_paste_app(self, name, flavor, conf):

    def _connect_registry_client(self):

        def get_connection_type(self2):

    def tearDown(self):

\OpenStack\glance-2014.1\glance\tests\integration\v2\test_tasks_api.py

def minimal_task_headers(owner='tenant1'):

def _new_task_fixture(**kwargs):

class TestTasksApi(base.ApiTest):

    def __init__(self, *args, **kwargs):

    def _post_new_task(self, **kwargs):

    def test_all_task_api(self):

    def test_task_schema_api(self):

    def test_create_new_task(self):

    def test_tasks_with_filter(self):

    def test_limited_tasks(self):

    def test_ordered_tasks(self):

    def test_delete_task(self):

\OpenStack\glance-2014.1\glance\tests\integration\v2\__init__.py

\OpenStack\glance-2014.1\glance\tests\integration\__init__.py

\OpenStack\glance-2014.1\glance\tests\stubs.py

class FakeRegistryConnection(object):

    def __init__(self, registry=None):

    def __call__(self, *args, **kwargs):

    def connect(self):

    def close(self):

    def request(self, method, url, body=None, headers=None):

    def getresponse(self):

        def __init__(self, *args, **kwargs):

        def fileno(self):

        def __init__(self, req):

        def sendfile(self, o, i, offset, nbytes):

        def __init__(self, *args, **kwargs):

        def connect(self):

        def close(self):

        def _clean_url(self, url):

        def putrequest(self, method, url):

        def putheader(self, key, value):

        def endheaders(self):

        def send(self, data):

        def request(self, method, url, body=None, headers=None):

        def getresponse(self):

    def fake_get_connection_type(client):

    def fake_image_iter(self):

    def fake_sendable(self, body):

def stub_out_registry_server(stubs, **kwargs):

    def fake_get_connection_type(client):

    def fake_image_iter(self):

\OpenStack\glance-2014.1\glance\tests\unit\api\middleware\test_cache_manage.py

class TestCacheManageFilter(test_utils.BaseTestCase):

    def setUp(self, mock_init_driver):

    def test_bogus_request(self):

    def test_get_cached_images(self, mock_get_cached_images):

    def test_delete_cached_image(self, mock_delete_cached_image):

    def test_delete_cached_images(self, mock_delete_cached_images):

    def test_put_queued_image(self, mock_queue_image):

    def test_get_queued_images(self, mock_get_queued_images):

    def test_delete_queued_image(self, mock_delete_queued_image):

    def test_delete_queued_images(self, mock_delete_queued_images):

\OpenStack\glance-2014.1\glance\tests\unit\api\middleware\__init__.py

\OpenStack\glance-2014.1\glance\tests\unit\api\test_cmd.py

class TestGlanceApiCmd(test_utils.BaseTestCase):

    def _do_nothing(self, *args, **kwargs):

    def _raise(self, exc):

        def fake(*args, **kwargs):

    def setUp(self):

    def tearDown(self):

    def test_supported_default_store(self):

    def test_unsupported_default_store(self):

    def test_worker_creation_failure(self):

    def test_cache_cleaner_main(self, mock_cache_clean, mock_cache_init_driver, mock_log_setup, mock_parse_config):

    def test_cache_cleaner_main_runtime_exception_handling(self, mock_cache):

    def test_cache_pruner_main(self, mock_cache_prune, mock_cache_init_driver, mock_log_setup, mock_parse_config):

    def test_cache_pruner_main_runtime_exception_handling(self, mock_cache):

\OpenStack\glance-2014.1\glance\tests\unit\api\test_cmd_cache_manage.py

class TestGlanceCmdManage(test_utils.BaseTestCase):

    def test_list_cached_images(self, mock_row_create, mock_images):

    def test_list_cached_images_empty(self, mock_images):

    def test_list_queued_images(self, mock_row_create, mock_images):

    def test_list_queued_images_empty(self, mock_images):

    def test_queue_image_without_index(self):

    def test_queue_image_not_forced_not_confirmed(self, mock_client, mock_confirm):

    def test_queue_image_not_forced_confirmed(self, mock_client, mock_confirm):

    def test_delete_cached_image_without_index(self):

    def test_delete_cached_image_not_forced_not_confirmed(self, mock_client, mock_confirm):

    def test_delete_cached_image_not_forced_confirmed(self, mock_client, mock_confirm):

    def test_delete_cached_images_not_forced_not_confirmed(self, mock_client, mock_confirm):

    def test_delete_cached_images_not_forced_confirmed(self, mock_client, mock_confirm):

    def test_delete_queued_image_without_index(self):

    def test_delete_queued_image_not_forced_not_confirmed(self, mock_client, mock_confirm):

    def test_delete_queued_image_not_forced_confirmed(self, mock_client, mock_confirm):

    def test_delete_queued_images_not_forced_not_confirmed(self, mock_client, mock_confirm):

    def test_delete_queued_images_not_forced_confirmed(self, mock_client, mock_confirm):

    def test_catch_error_not_found(self, mock_function):

    def test_catch_error_forbidden(self, mock_function):

    def test_catch_error_unhandled(self, mock_function):

    def test_catch_error_unhandled_debug_mode(self, mock_function):

    def test_cache_manage_env(self):

    def test_cache_manage_env_default(self):

    def test_create_option(self):

    def test_parse_options_no_parameters(self, mock_lookup):

    def test_parse_options_no_arguments(self, mock_printout):

    def test_parse_options_retrieve_command(self, mock_lookup):

    def test_lookup_command_unsupported_command(self):

    def test_lookup_command_supported_command(self):

\OpenStack\glance-2014.1\glance\tests\unit\api\test_common.py

class SimpleIterator(object):

    def __init__(self, file_object, chunk_size):

    def __iter__(self):

        def read_chunk():

class TestSizeCheckedIter(testtools.TestCase):

    def _get_image_metadata(self):

    def _get_webob_response(self):

    def test_uniform_chunk_size(self):

    def test_small_last_chunk(self):

    def test_variable_chunk_size(self):

    def test_too_many_chunks(self):

    def test_too_few_chunks(self):

    def test_too_much_data(self):

    def test_too_little_data(self):

class TestMalformedRequest(test_utils.BaseTestCase):

    def setUp(self):

    def test_redirect_incomplete_url(self):

\OpenStack\glance-2014.1\glance\tests\unit\api\test_property_protections.py

class TestProtectedImageRepoProxy(utils.BaseTestCase):

    def setUp(self):

    def test_get_image(self):

    def test_list_image(self):

class TestProtectedImageProxy(utils.BaseTestCase):

    def setUp(self):

        def __init__(self, extra_prop):

    def test_read_image_with_extra_prop(self):

class TestExtraPropertiesProxy(utils.BaseTestCase):

    def setUp(self):

    def test_read_extra_property_as_admin_role(self):

    def test_read_extra_property_as_unpermitted_role(self):

    def test_update_extra_property_as_permitted_role_after_read(self):

    def test_update_extra_property_as_unpermitted_role_after_read(self):

    def test_update_reserved_extra_property(self):

    def test_create_extra_property_admin(self):

    def test_create_reserved_extra_property(self):

    def test_delete_extra_property_as_admin_role(self):

    def test_delete_nonexistant_extra_property_as_admin_role(self):

    def test_delete_reserved_extra_property(self):

    def test_delete_nonexistant_extra_property(self):

class TestProtectedImageFactoryProxy(utils.BaseTestCase):

    def setUp(self):

    def test_create_image_no_extra_prop(self):

    def test_create_image_extra_prop(self):

    def test_create_image_extra_prop_reserved_property(self):

    def test_create_image_extra_prop_admin(self):

    def test_create_image_extra_prop_invalid_role(self):

\OpenStack\glance-2014.1\glance\tests\unit\api\__init__.py

\OpenStack\glance-2014.1\glance\tests\unit\base.py

class StoreClearingUnitTest(test_utils.BaseTestCase):

    def setUp(self):

    def _create_stores(self):

class IsolatedUnitTest(StoreClearingUnitTest):

    def setUp(self):

    def _copy_data_file(self, file_name, dst_dir):

    def set_policy_rules(self, rules):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_client.py

class TestClient(testtools.TestCase):

    def setUp(self):

    def tearDown(self):

    def test_make_auth_plugin(self):

    def test_http_encoding_headers(self):

    def test_http_encoding_params(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_config.py

class TestPasteApp(test_utils.BaseTestCase):

    def setUp(self):

    def _do_test_load_paste_app(self, expected_app_type, make_paste_file=True, paste_flavor=None, paste_config_file=None, paste_append=None):

        def _writeto(path, str):

        def _appendto(orig, copy, str):

    def test_load_paste_app(self):

    def test_load_paste_app_paste_config_not_found(self):

    def test_load_paste_app_with_paste_flavor(self):

    def test_load_paste_app_with_paste_config_file(self):

    def test_get_path_non_exist(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_exception.py

class GlanceExceptionTestCase(test_utils.BaseTestCase):

    def test_default_error_msg(self):

    def test_specified_error_msg(self):

    def test_default_error_msg_with_kwargs(self):

    def test_specified_error_msg_with_kwargs(self):

    def test_non_unicode_error_msg(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_location_strategy.py

class TestLocationStrategy(base.IsolatedUnitTest):

    def _set_original_strategies(self, original_strategies):

    def setUp(self):

    def test_load_strategy_modules(self):

    def test_load_strategy_module_with_deduplicating(self):

        def _fake_stevedore_extension_manager(*args, **kwargs):

        def _fake_stevedore_driver_manager(*args, **kwargs):

    def test_load_strategy_module_with_init_exception(self):

        def _fake_stevedore_extension_manager(*args, **kwargs):

        def _fake_stevedore_driver_manager(*args, **kwargs):

    def test_verify_valid_location_strategy(self):

    def test_verify_invalid_location_strategy(self):

    def test_get_ordered_locations_with_none_or_empty_locations(self):

    def test_get_ordered_locations(self):

    def test_choose_best_location_with_none_or_empty_locations(self):

    def test_choose_best_location(self):

class TestLocationOrderStrategyModule(base.IsolatedUnitTest):

    def test_get_ordered_locations(self):

class TestStoreTypeStrategyModule(base.IsolatedUnitTest):

    def test_get_ordered_locations(self):

    def test_get_ordered_locations_with_invalid_store_name(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_property_utils.py

def create_context(policy, roles=[]):

class TestPropertyRulesWithRoles(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_is_property_protections_enabled_true(self):

    def test_is_property_protections_enabled_false(self):

    def test_property_protection_file_doesnt_exist(self):

    def test_property_protection_with_mutually_exclusive_rule(self):

    def test_property_protection_with_malformed_rule(self):

    def test_property_protection_with_missing_operation(self):

    def test_property_protection_with_misspelt_operation(self):

    def test_property_protection_with_whitespace(self):

    def test_check_property_rules_invalid_action(self):

    def test_check_property_rules_read_permitted_admin_role(self):

    def test_check_property_rules_read_permitted_specific_role(self):

    def test_check_property_rules_read_unpermitted_role(self):

    def test_check_property_rules_create_permitted_admin_role(self):

    def test_check_property_rules_create_permitted_specific_role(self):

    def test_check_property_rules_create_unpermitted_role(self):

    def test_check_property_rules_update_permitted_admin_role(self):

    def test_check_property_rules_update_permitted_specific_role(self):

    def test_check_property_rules_update_unpermitted_role(self):

    def test_check_property_rules_delete_permitted_admin_role(self):

    def test_check_property_rules_delete_permitted_specific_role(self):

    def test_check_property_rules_delete_unpermitted_role(self):

    def test_property_config_loaded_in_order(self):

    def test_property_rules_loaded_in_order(self):

    def test_check_property_rules_create_all_permitted(self):

    def test_check_property_rules_read_all_permitted(self):

    def test_check_property_rules_update_all_permitted(self):

    def test_check_property_rules_delete_all_permitted(self):

    def test_check_property_rules_create_none_permitted(self):

    def test_check_property_rules_read_none_permitted(self):

    def test_check_property_rules_update_none_permitted(self):

    def test_check_property_rules_delete_none_permitted(self):

    def test_check_property_rules_read_none(self):

    def test_check_property_rules_update_none(self):

    def test_check_property_rules_delete_none(self):

    def test_check_return_first_match(self):

class TestPropertyRulesWithPolicies(base.IsolatedUnitTest):

    def setUp(self):

    def tearDown(self):

    def test_check_property_rules_create_permitted_specific_policy(self):

    def test_check_property_rules_create_unpermitted_policy(self):

    def test_check_property_rules_read_permitted_specific_policy(self):

    def test_check_property_rules_read_unpermitted_policy(self):

    def test_check_property_rules_update_permitted_specific_policy(self):

    def test_check_property_rules_update_unpermitted_policy(self):

    def test_check_property_rules_delete_permitted_specific_policy(self):

    def test_check_property_rules_delete_unpermitted_policy(self):

    def test_property_protection_with_malformed_rule(self):

    def test_property_protection_with_multiple_policies(self):

    def test_check_property_rules_create_all_permitted(self):

    def test_check_property_rules_read_all_permitted(self):

    def test_check_property_rules_update_all_permitted(self):

    def test_check_property_rules_delete_all_permitted(self):

    def test_check_property_rules_create_none_permitted(self):

    def test_check_property_rules_read_none_permitted(self):

    def test_check_property_rules_update_none_permitted(self):

    def test_check_property_rules_delete_none_permitted(self):

    def test_check_property_rules_read_none(self):

    def test_check_property_rules_update_none(self):

    def test_check_property_rules_delete_none(self):

    def test_check_return_first_match(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_rpc.py

class FakeResource(object):

    def get_images(self, context, keyword=None):

    def count_images(self, context, images):

    def get_all_images(self, context):

    def raise_value_error(self, context):

    def raise_weird_error(self, context):

def create_api():

class TestRPCController(base.IsolatedUnitTest):

    def setUp(self):

    def test_register(self):

    def test_reigster_filtered(self):

    def test_reigster_excluded(self):

    def test_reigster_refiner(self):

    def test_request(self):

    def test_request_exc(self):

    def test_rpc_errors(self):

    def test_rpc_exception_propagation(self):

class TestRPCClient(base.IsolatedUnitTest):

    def setUp(self):

    def fake_request(self, method, url, body, headers):

    def test_method_proxy(self):

    def test_bulk_request(self):

    def test_exception_raise(self):

    def test_rpc_exception(self):

    def test_non_str_or_dict_response(self):

class TestRPCJSONSerializer(test_utils.BaseTestCase):

    def test_to_json(self):

    def test_to_json_with_date_format_value(self):

    def test_to_json_with_more_deep_format(self):

    def test_default(self):

class TestRPCJSONDeserializer(test_utils.BaseTestCase):

    def test_has_body_no_content_length(self):

    def test_has_body_zero_content_length(self):

    def test_has_body_has_content_length(self):

    def test_no_body_no_content_length(self):

    def test_from_json(self):

    def test_from_json_malformed(self):

    def test_default_no_body(self):

    def test_default_with_body(self):

    def test_has_body_has_transfer_encoding(self):

    def test_to_json_with_date_format_value(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_utils.py

class TestUtils(test_utils.BaseTestCase):

    def test_cooperative_reader(self):

    def test_cooperative_reader_of_iterator(self):

    def test_cooperative_reader_of_iterator_stop_iteration_err(self):

    def test_limiting_reader(self):

    def test_limiting_reader_fails(self):

        def _consume_all_iter():

        def _consume_all_read():

    def test_get_meta_from_headers(self):

    def test_get_meta_from_headers_bad_headers(self):

    def test_add_features_to_http_headers(self):

    def test_image_meta(self):

    def test_create_pretty_table(self):

    def test_mutating(self):

        def fake_function(req, context):

    def test_validate_key_cert_key(self):

    def test_validate_key_cert_no_private_key(self):

    def test_validate_key_cert_cert_cant_read(self):

    def test_validate_key_cert_key_cant_read(self):

class UUIDTestCase(test_utils.BaseTestCase):

    def test_is_uuid_like(self):

    def test_id_is_uuid_like(self):

    def test_name_is_uuid_like(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\test_wsgi.py

class RequestTest(test_utils.BaseTestCase):

    def _set_expected_languages(self, all_locales=[], avail_locales=None):

        def returns_some_locales(*args, **kwargs):

        def fake_gettext_find(lang_id, *args, **kwargs):

    def test_content_type_missing(self):

    def test_content_type_unsupported(self):

    def test_content_type_with_charset(self):

    def test_content_type_from_accept_xml(self):

    def test_content_type_from_accept_json(self):

    def test_content_type_from_accept_xml_json(self):

    def test_content_type_from_accept_json_xml_quality(self):

    def test_content_type_accept_default(self):

    def test_language_accept_default(self):

    def test_language_accept_none(self):

    def test_best_match_language_expected(self):

    def test_request_match_language_unexpected(self):

    def test_best_match_language_unknown(self, mock_best_match):

class ResourceTest(test_utils.BaseTestCase):

    def test_get_action_args(self):

    def test_get_action_args_invalid_index(self):

    def test_get_action_args_del_controller_error(self):

    def test_get_action_args_del_format_error(self):

    def test_dispatch(self):

    def test_dispatch_default(self):

    def test_dispatch_no_default(self):

    def test_call(self):

        def dispatch(self, obj, action, *args, **kwargs):

    def test_resource_call_error_handle_localized(self, mock_translate_exception):

    def test_translate_exception(self, mock_translate, mock_best_match):

class JSONResponseSerializerTest(test_utils.BaseTestCase):

    def test_to_json(self):

    def test_to_json_with_date_format_value(self):

    def test_to_json_with_more_deep_format(self):

    def test_to_json_with_set(self):

    def test_default(self):

class JSONRequestDeserializerTest(test_utils.BaseTestCase):

    def test_has_body_no_content_length(self):

    def test_has_body_zero_content_length(self):

    def test_has_body_has_content_length(self):

    def test_no_body_no_content_length(self):

    def test_from_json(self):

    def test_from_json_malformed(self):

    def test_default_no_body(self):

    def test_default_with_body(self):

    def test_has_body_has_transfer_encoding(self):

    def test_get_bind_addr_default_value(self):

class ServerTest(test_utils.BaseTestCase):

    def test_create_pool(self):

class TestHelpers(test_utils.BaseTestCase):

    def test_headers_are_unicode(self):

    def test_data_passed_properly_through_headers(self):

class GetSocketTestCase(test_utils.BaseTestCase):

    def setUp(self):

    def test_correct_get_socket(self):

    def test_get_socket_without_all_ssl_reqs(self):

    def test_get_socket_with_bind_problems(self):

    def test_get_socket_with_unexpected_socket_errno(self):

\OpenStack\glance-2014.1\glance\tests\unit\common\__init__.py

\OpenStack\glance-2014.1\glance\tests\unit\fake_rados.py

class mock_rados(object):

class mock_rbd(object):

\OpenStack\glance-2014.1\glance\tests\unit\test_auth.py

class FakeResponse(object):

    def __init__(self, resp):

    def __getitem__(self, key):

    def status(self):

class V2Token(object):

    def __init__(self):

    def add_service_no_type(self):

    def add_service(self, s_type, region_list=[]):

    def token(self):

    def base_endpoint(self):

    def base_token(self):

class TestKeystoneAuthPlugin(utils.BaseTestCase):

    def setUp(self):

    def test_get_plugin_from_strategy_keystone(self):

    def test_get_plugin_from_strategy_keystone_configure_via_auth_false(self):

    def test_required_creds(self):

    def test_invalid_auth_url_v1(self):

        def fake_do_request(*args, **kwargs):

    def test_invalid_auth_url_v2(self):

        def fake_do_request(*args, **kwargs):

    def test_v1_auth(self):

        def fake_do_request(cls, url, method, headers=None, body=None):

    def test_v2_auth(self):

        def fake_do_request(cls, url, method, headers=None, body=None):

class TestEndpoints(utils.BaseTestCase):

    def setUp(self):

    def test_get_endpoint_with_custom_server_type(self):

    def test_get_endpoint_with_custom_endpoint_type(self):

    def test_get_endpoint_raises_with_invalid_service_type(self):

    def test_get_endpoint_raises_with_invalid_endpoint_type(self):

    def test_get_endpoint_raises_with_invalid_endpoint_region(self):

class TestImageMutability(utils.BaseTestCase):

    def setUp(self):

    def _is_mutable(self, tenant, owner, is_admin=False):

    def test_admin_everything_mutable(self):

    def test_no_tenant_nothing_mutable(self):

    def test_regular_user(self):

class TestImmutableImage(utils.BaseTestCase):

    def setUp(self):

    def _test_change(self, attr, value):

    def test_change_id(self):

    def test_change_name(self):

    def test_change_owner(self):

    def test_change_min_disk(self):

    def test_change_min_ram(self):

    def test_change_disk_format(self):

    def test_change_container_format(self):

    def test_change_visibility(self):

    def test_change_status(self):

    def test_change_created_at(self):

    def test_change_updated_at(self):

    def test_change_locations(self):

    def test_change_size(self):

    def test_change_tags(self):

    def test_change_properties(self):

    def test_delete(self):

    def test_set_data(self):

    def test_get_data(self):

class TestImageFactoryProxy(utils.BaseTestCase):

    def setUp(self):

    def test_default_owner_is_set(self):

    def test_wrong_owner_cannot_be_set(self):

    def test_cannot_set_owner_to_none(self):

    def test_admin_can_set_any_owner(self):

    def test_admin_can_set_owner_to_none(self):

    def test_admin_still_gets_default_tenant(self):

class TestImageRepoProxy(utils.BaseTestCase):

    def setUp(self):

    def test_get_mutable_image(self):

    def test_get_immutable_image(self):

    def test_list(self):

class TestImmutableTask(utils.BaseTestCase):

    def setUp(self):

    def _test_change(self, attr, value):

    def test_change_id(self):

    def test_change_type(self):

    def test_change_status(self):

    def test_change_owner(self):

    def test_change_expires_at(self):

    def test_change_created_at(self):

    def test_change_updated_at(self):

    def test_begin_processing(self):

    def test_succeed(self):

    def test_fail(self):

class TestTaskFactoryProxy(utils.BaseTestCase):

    def setUp(self):

    def test_task_create_default_owner(self):

    def test_task_create_wrong_owner(self):

    def test_task_create_owner_as_None(self):

    def test_task_create_admin_context_owner_as_None(self):

class TestTaskRepoProxy(utils.BaseTestCase):

    def setUp(self):

    def test_get_mutable_task(self):

    def test_get_immutable_task(self):

    def test_list(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_cached_images.py

class FakePolicyEnforcer(policy.Enforcer):

    def __init__(self):

    def enforce(self, context, action, target):

    def check(rule, target, creds, exc=None, *args, **kwargs):

    def _check(self, context, rule, target, *args, **kwargs):

class FakeCache(image_cache.ImageCache):

    def __init__(self):

    def init_driver(self):

    def get_cached_images(self):

    def delete_cached_image(self, image_id):

    def get_queued_images(self):

    def queue_image(self, image_id):

    def delete_queued_image(self, image_id):

class FakeController(cached_images.Controller):

    def __init__(self):

class TestController(testtools.TestCase):

    def test_initialization_without_conf(self):

class TestCachedImages(testtools.TestCase):

    def setUp(self):

    def test_get_cached_images(self):

    def test_delete_cached_images(self):

    def test_get_queued_images(self):

    def test_queue_image(self):

    def test_delete_queued_image(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_cache_middleware.py

class TestCacheMiddlewareURLMatching(testtools.TestCase):

    def test_v1_no_match_detail(self):

    def test_v1_no_match_detail_with_query_params(self):

    def test_v1_match_id_with_query_param(self):

    def test_v2_match_id(self):

    def test_v2_no_match_bad_path(self):

    def test_no_match_unknown_version(self):

class TestCacheMiddlewareRequestStashCacheInfo(testtools.TestCase):

    def setUp(self):

    def test_stash_cache_request_info(self):

    def test_fetch_cache_request_info(self):

    def test_fetch_cache_request_info_unset(self):

class ChecksumTestCacheFilter(glance.api.middleware.cache.CacheFilter):

    def __init__(self):

class TestCacheMiddlewareChecksumVerification(base.IsolatedUnitTest):

    def setUp(self):

    def test_checksum_v1_header(self):

    def test_checksum_v2_header(self):

    def test_checksum_missing_header(self):

class FakeImageSerializer(object):

    def show(self, response, raw_response):

class ProcessRequestTestCacheFilter(glance.api.middleware.cache.CacheFilter):

    def __init__(self):

class TestCacheMiddlewareProcessRequest(base.IsolatedUnitTest):

    def test_v1_deleted_image_fetch(self):

        def fake_get_image_metadata(context, image_id):

        def dummy_img_iterator():

    def test_process_v1_request_for_deleted_but_cached_image(self):

        def fake_process_v1_request(request, image_id, image_iterator):

    def test_v1_process_request_image_fetch(self):

        def fake_get_image_metadata(context, image_id):

        def dummy_img_iterator():

    def test_v1_remove_location_image_fetch(self):

        def fake_get_image_metadata(context, image_id):

        def dummy_img_iterator():

    def test_verify_metadata_deleted_image(self):

    def test_verify_metadata_zero_size(self):

        def fake_get_image_size(image_id):

    def test_v2_process_request_response_headers(self):

        def dummy_img_iterator():

        def fake_image_get(self, image_id):

        def fake_image_tag_get_all(context, image_id, session=None):

    def test_process_request_without_download_image_policy(self):

class TestCacheMiddlewareProcessResponse(base.IsolatedUnitTest):

    def test_process_v1_DELETE_response(self):

    def test_get_status_code(self):

    def test_process_response(self):

        def fake_fetch_request_info(*args, **kwargs):

    def test_process_response_without_download_image_policy(self):

        def fake_fetch_request_info(*args, **kwargs):

\OpenStack\glance-2014.1\glance\tests\unit\test_cinder_store.py

class FakeObject(object):

    def __init__(self, **kwargs):

class TestCinderStore(base.StoreClearingUnitTest):

    def setUp(self):

    def test_cinder_configure_add(self):

    def test_cinder_get_size(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_context.py

def _fake_image(owner, is_public):

def _fake_membership(can_share=False):

class TestContext(utils.BaseTestCase):

    def setUp(self):

    def do_visible(self, exp_res, img_owner, img_public, **kwargs):

    def test_empty_public(self):

    def test_empty_public_owned(self):

    def test_empty_private(self):

    def test_empty_private_owned(self):

    def test_anon_public(self):

    def test_anon_public_owned(self):

    def test_anon_private(self):

    def test_anon_private_owned(self):

    def test_auth_public(self):

    def test_auth_public_unowned(self):

    def test_auth_public_owned(self):

    def test_auth_private(self):

    def test_auth_private_unowned(self):

    def test_auth_private_owned(self):

    def test_request_id(self):

    def test_service_catalog(self):

    def test_context_local_store(self):

    def test_user_identity(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_context_middleware.py

class TestContextMiddleware(base.IsolatedUnitTest):

    def _build_request(self, roles=None, identity_status='Confirmed', service_catalog=None):

    def _build_middleware(self):

    def test_header_parsing(self):

    def test_is_admin_flag(self):

    def test_roles_case_insensitive(self):

    def test_roles_stripping(self):

    def test_anonymous_access_enabled(self):

    def test_anonymous_access_defaults_to_disabled(self):

    def test_service_catalog(self):

    def test_invalid_service_catalog(self):

class TestUnauthenticatedContextMiddleware(base.IsolatedUnitTest):

    def test_request(self):

    def test_response(self):

\OpenStack\glance-2014.1\glance\tests\unit\test_db.py

class TestDbUtilities(test_utils.BaseTestCase):

    def setUp(self):

    def test_get_api_calls_configure_if_present(self, import_module):

    def test_get_api_skips_configure_if_missing(self, import_module):

def _db_fixture(id, **kwargs):

def _db_image_member_fixture(image_id, member_id, **kwargs):

def _db_task_fixture(task_id, type, status, **kwargs):

class TestImageRepo(test_utils.BaseTestCase):

    def setUp(self):

    def _create_images(self):

    def _create_image_members(self):

    def test_get(self):

    def test_location_value(self):

    def test_location_data_value(self):

    def test_location_data_exists(self):

    def test_get_not_found(self):

    def test_get_forbidden(self):

    def test_list(self):

    def _do_test_list_status(self, status, expected):

    def test_list_status(self):

    def test_list_status_pending(self):

    def test_list_status_rejected(self):

    def test_list_status_all(self):

    def test_list_with_marker(self):

OpenStack Index

Previous

Next