This Page

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

The nova.tests.test_utils Module

class nova.tests.test_utils.ExecuteTestCase(methodName='runTest')

Bases: nova.test.TestCase

test_no_retry_on_success()
test_retry_on_failure()
test_unknown_kwargs_raises_error()
class nova.tests.test_utils.GenericUtilsTestCase(methodName='runTest')

Bases: nova.test.TestCase

test_bool_from_str()
test_parse_server_string()
class nova.tests.test_utils.GetFromPathTestCase(methodName='runTest')

Bases: nova.test.TestCase

test_accepts_dictionaries()
test_bad_xpath()
test_does_select()
test_flattens_lists()
test_real_failure1()
test_tolerates_nones()
class nova.tests.test_utils.IsUUIDLikeTestCase(methodName='runTest')

Bases: nova.test.TestCase

assertUUIDLike(val, expected)
test_good_uuid()
test_integer_passed()
test_non_uuid_string_passed()
class nova.tests.test_utils.MiscellaneousTestCases(methodName='runTest')

Bases: nova.test.TestCase

test_safe_parse_xml()
class nova.tests.test_utils.MonkeyPatchTestCase(methodName='runTest')

Bases: nova.test.TestCase

Unit test for utils.monkey_patch().

setUp()
test_monkey_patch()
class nova.tests.test_utils.RingBufferTestCase(methodName='runTest')

Bases: nova.test.TestCase

Unit test for utils.RingBuffer().

setUp()
tearDown()
testEmpty()
testReOpen()
class nova.tests.test_utils.ToPrimitiveTestCase(methodName='runTest')

Bases: nova.test.TestCase

test_datetime()
test_dict()
test_empty_dict()
test_empty_list()
test_instance()
test_iter()
test_iteritems()
test_list()
test_nasties()
test_tuple()
test_typeerror()
nova.tests.test_utils.testPermutations()

Test various permutations of writing to a RingBuffer.

Try all permutations of writing [0,5) bytes three times to a RingBuffer of size 4. This makes use of nose’s test generator capability so cannot be a subclass of test.TestCase.