Previous topic

The cinder.tests.api.openstack.fakes Module

Next topic

The cinder.tests.api.openstack.test_faults Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.tests.api.openstack.test_common Module

Test suites for ‘common’ code used throughout the OpenStack HTTP API.

class LimiterTest(methodName='runTest')

Bases: cinder.test.TestCase

Unit tests for the cinder.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 a max_limit other than 1000.

test_limiter_limit_and_offset()

Test request with both limit and offset.

test_limiter_limit_medium()

Test limit of 10.

test_limiter_limit_over_max()

Test limit of 3000.

test_limiter_limit_zero()

Test limit of zero.

test_limiter_negative_limit()

Test a negative limit.

test_limiter_negative_offset()

Test a negative offset.

test_limiter_nothing()

Test request with no offset or limit

test_limiter_offset_bad()

Test offset key works with a BAD offset.

test_limiter_offset_blank()

Test offset key works with a blank offset.

test_limiter_offset_medium()

Test offset key works with a medium sized number.

test_limiter_offset_over_max()

Test offset key works with a number over 1000 (max_limit).

test_limiter_offset_zero()

Test offset key works with 0.

class MiscFunctionsTest(methodName='runTest')

Bases: cinder.test.TestCase

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()
class PaginationParamsTest(methodName='runTest')

Bases: cinder.test.TestCase

Unit tests for the cinder.api.openstack.common.get_pagination_params method which takes in a request object and returns ‘marker’ and ‘limit’ GET params.

test_invalid_limit()

Test invalid limit param.

test_no_params()

Test no params.

test_valid_limit()

Test valid limit param.

test_valid_limit_and_marker()

Test valid limit and marker parameters.

test_valid_marker()

Test valid marker param.