glance.tests.unit.api package

Submodules

glance.tests.unit.api.test_cmd module

class glance.tests.unit.api.test_cmd.TestGlanceApiCmd(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]
tearDown()[source]
test_cache_cleaner_main(*args, **keywargs)[source]
test_cache_cleaner_main_runtime_exception_handling(*args, **keywargs)[source]
test_cache_pruner_main(*args, **keywargs)[source]
test_cache_pruner_main_runtime_exception_handling(*args, **keywargs)[source]
test_supported_default_store()[source]
test_unsupported_default_store()[source]
test_worker_creation_failure()[source]

glance.tests.unit.api.test_cmd_cache_manage module

class glance.tests.unit.api.test_cmd_cache_manage.TestGlanceCmdManage(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

test_cache_manage_env(*args, **keywargs)[source]
test_cache_manage_env_default(*args, **keywargs)[source]
test_catch_error_forbidden(*args, **keywargs)[source]
test_catch_error_not_found(*args, **keywargs)[source]
test_catch_error_unhandled(*args, **keywargs)[source]
test_catch_error_unhandled_debug_mode(*args, **keywargs)[source]
test_create_option(*args, **keywargs)[source]
test_delete_cached_image_not_forced_confirmed(*args, **keywargs)[source]
test_delete_cached_image_not_forced_not_confirmed(*args, **keywargs)[source]
test_delete_cached_image_without_index(*args, **keywargs)[source]
test_delete_cached_images_not_forced_confirmed(*args, **keywargs)[source]
test_delete_cached_images_not_forced_not_confirmed(*args, **keywargs)[source]
test_delete_queued_image_not_forced_confirmed(*args, **keywargs)[source]
test_delete_queued_image_not_forced_not_confirmed(*args, **keywargs)[source]
test_delete_queued_image_without_index(*args, **keywargs)[source]
test_delete_queued_images_not_forced_confirmed(*args, **keywargs)[source]
test_delete_queued_images_not_forced_not_confirmed(*args, **keywargs)[source]
test_help(*args, **keywargs)[source]
test_help_with_command(*args, **keywargs)[source]
test_help_with_redundant_command(*args, **keywargs)[source]
test_list_cached_images(*args, **keywargs)[source]

Verify that list_cached() method correctly processes images with all filled data and images with not filled ‘last_accessed’ field.

test_list_cached_images_empty(*args, **keywargs)[source]

Verify that list_cached() method handles a case when no images are cached without errors.

test_list_queued_images(*args, **keywargs)[source]

Verify that list_queued() method correctly processes images.

test_list_queued_images_empty(*args, **keywargs)[source]

Verify that list_queued() method handles a case when no images were queued without errors.

test_lookup_command_supported_command(*args, **keywargs)[source]
test_lookup_command_unsupported_command(*args, **keywargs)[source]
test_parse_options_no_arguments(*args, **keywargs)[source]
test_parse_options_no_parameters(*args, **keywargs)[source]
test_parse_options_retrieve_command(*args, **keywargs)[source]
test_queue_image_not_forced_confirmed(*args, **keywargs)[source]
test_queue_image_not_forced_not_confirmed(*args, **keywargs)[source]
test_queue_image_without_index(*args, **keywargs)[source]

glance.tests.unit.api.test_common module

class glance.tests.unit.api.test_common.SimpleIterator(file_object, chunk_size)[source]

Bases: object

class glance.tests.unit.api.test_common.TestMalformedRequest(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]

Establish a clean test environment

test_redirect_incomplete_url()[source]

Test Glance redirects /v# to /v#/ with correct Location header

class glance.tests.unit.api.test_common.TestSizeCheckedIter(*args, **kwargs)[source]

Bases: testtools.testcase.TestCase

test_small_last_chunk()[source]
test_too_few_chunks()[source]
test_too_little_data()[source]
test_too_many_chunks()[source]

An image should streamed regardless of expected_size

test_too_much_data()[source]
test_uniform_chunk_size()[source]
test_variable_chunk_size()[source]

glance.tests.unit.api.test_property_protections module

class glance.tests.unit.api.test_property_protections.TestExtraPropertiesProxy(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]
test_create_extra_property_admin()[source]
test_create_reserved_extra_property()[source]
test_delete_empty_extra_property()[source]
test_delete_extra_property_as_admin_role()[source]
test_delete_nonexistant_extra_property()[source]
test_delete_nonexistant_extra_property_as_admin_role()[source]
test_delete_reserved_extra_property()[source]
test_read_extra_property_as_admin_role()[source]
test_read_extra_property_as_unpermitted_role()[source]
test_update_empty_extra_property()[source]
test_update_extra_property_as_permitted_role_after_read()[source]
test_update_extra_property_as_unpermitted_role_after_read()[source]
test_update_reserved_extra_property()[source]
class glance.tests.unit.api.test_property_protections.TestProtectedImageFactoryProxy(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

setUp()[source]
test_create_image_extra_prop()[source]
test_create_image_extra_prop_admin()[source]
test_create_image_extra_prop_invalid_role()[source]
test_create_image_extra_prop_reserved_property()[source]
test_create_image_no_extra_prop()[source]
class glance.tests.unit.api.test_property_protections.TestProtectedImageProxy(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

class ImageStub(extra_prop)[source]

Bases: object

TestProtectedImageProxy.setUp()[source]
TestProtectedImageProxy.test_read_image_with_extra_prop()[source]
class glance.tests.unit.api.test_property_protections.TestProtectedImageRepoProxy(*args, **kwargs)[source]

Bases: glance.tests.utils.BaseTestCase

class ImageRepoStub(fixtures)[source]

Bases: object

add(image)[source]
get(image_id)[source]
list(*args, **kwargs)[source]
TestProtectedImageRepoProxy.setUp()[source]
TestProtectedImageRepoProxy.test_get_image()[source]
TestProtectedImageRepoProxy.test_list_image()[source]

Module contents