Test the implementation of option length checking
LengthTestingOption(data: bytes = b'')¶
Fake DHCPv6 option for testing length checks
load_from(buffer: bytes, offset: int = 0, length: int = None) → int¶
Load the internal state of this object from the given buffer. The buffer may contain more data after the structured element is parsed. This data is ignored.
- buffer – The buffer to read data from
- offset – The offset in the buffer where to start reading
- length – The amount of data we are allowed to read from the buffer
The number of bytes used from the buffer
save() → Union¶
Save the internal state of this object as a buffer.
Returns: The buffer with the data from this element
Hook method for setting up the test fixture before exercising it.
Hook method for deconstructing the test fixture after testing it.