dhcpkit.tests.ipv6.options.test_option module

Test the basic option implementation

class dhcpkit.tests.ipv6.options.test_option.OptionTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

check_integer_property_range(property_name: str, min_value: int = None, max_value: int = None)[source]

Perform basic verification of validation of an integer range

Parameters:
  • property_name – The property under test
  • min_value – The minimum value allowed
  • max_value – The maximum value allowed
check_unsigned_integer_property(property_name: str, size: int = None)[source]

Perform basic verification of validation of an unsigned integer

Parameters:
  • property_name – The property under test
  • size – The number of bits of this integer field
parse_option()[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_length()[source]
test_load_from_wrong_buffer()[source]
test_overflow()[source]
test_parse()[source]
test_save_fixture()[source]
test_save_parsed()[source]
test_validate()[source]