Test suites for ‘common’ code used throughout the OpenStack HTTP API.
-
class LimiterTest(*args, **kwargs)
Bases: nova.test.TestCase
Unit tests for the nova.api.openstack.common.limited method which takes
in a list of items and, depending on the ‘offset’ and ‘limit’ GET params,
returns a subset or complete set of the given items.
-
setUp()
Run before each test.
-
test_limiter_custom_max_limit()
-
test_limiter_limit_and_offset()
-
test_limiter_limit_medium()
-
test_limiter_limit_over_max()
-
test_limiter_limit_zero()
-
test_limiter_negative_limit()
-
test_limiter_negative_offset()
-
test_limiter_nothing()
-
test_limiter_offset_bad()
-
test_limiter_offset_blank()
-
test_limiter_offset_medium()
-
test_limiter_offset_over_max()
-
test_limiter_offset_zero()
-
class MetadataXMLDeserializationTest(*args, **kwargs)
Bases: nova.test.TestCase
-
deserializer = <nova.api.openstack.common.MetadataXMLDeserializer object at 0x1a91ce90>
-
test_create()
-
test_create_empty()
-
test_update()
-
test_update_all()
-
class MetadataXMLSerializationTest(*args, **kwargs)
Bases: nova.test.TestCase
-
test_create()
-
test_index()
-
test_index_null()
-
test_index_unicode()
-
test_metadata_deserializer()
Should throw a 400 error on corrupt xml.
-
test_show()
-
test_update_all()
-
test_update_item()
-
test_xml_declaration()
-
class MiscFunctionsTest(*args, **kwargs)
Bases: nova.test.TestCase
-
test_check_img_metadata_properties_quota_inv_metadata()
-
test_check_img_metadata_properties_quota_valid_metadata()
-
test_get_id_from_href_with_int()
-
test_get_id_from_href_with_int_url()
-
test_get_id_from_href_with_int_url_query()
-
test_get_id_from_href_with_uuid()
-
test_get_id_from_href_with_uuid_url()
-
test_get_id_from_href_with_uuid_url_query()
-
test_raise_http_conflict_for_instance_invalid_state()
-
test_remove_major_version_from_href()
-
test_remove_version_from_href()
-
test_remove_version_from_href_2()
-
test_remove_version_from_href_3()
-
test_remove_version_from_href_4()
-
test_remove_version_from_href_bad_request()
-
test_remove_version_from_href_bad_request_2()
-
test_remove_version_from_href_bad_request_3()
Bases: nova.test.TestCase
Unit tests for the nova.api.openstack.common.get_pagination_params
method which takes in a request object and returns ‘marker’ and ‘limit’
GET params.
-
test_valid_limit_and_marker()