dhcpkit.tests.ipv6.server.test_message_handler module

Testing of the message handler

class dhcpkit.tests.ipv6.server.test_message_handler.BadExceptionHandler[source]

Bases: dhcpkit.ipv6.server.handlers.Handler

A handler that raises a bogus exception

pre(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle)[source]

Raise UseMulticastError on multicast messages… This is intentionally wrong.

class dhcpkit.tests.ipv6.server.test_message_handler.DummyExtension[source]

Bases: object

A server extension that adds the DummyMarksHandler at both setup and cleanup

static create_cleanup_handlers()[source]

Add the DummyMarksHandler at cleanup

static create_setup_handlers()[source]

Add the DummyMarksHandler at setup

class dhcpkit.tests.ipv6.server.test_message_handler.DummyMarksHandler(mark: str)[source]

Bases: dhcpkit.ipv6.server.handlers.Handler

A handler that sets marks in each of the phases of message handling

handle(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle)[source]

Add a mark to show we have been here

post(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle)[source]

Add a mark to show we have been here

pre(bundle: dhcpkit.ipv6.server.transaction_bundle.TransactionBundle)[source]

Add a mark to show we have been here

class dhcpkit.tests.ipv6.server.test_message_handler.MessageHandlerTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

setUp()[source]

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

test_accept_unicast_message()[source]
test_badly_rejected_multicast_message()[source]
test_confirm_message()[source]
test_empty_confirm_message()[source]
test_empty_message()[source]
test_ignorable_multicast_message()[source]
test_not_implemented_message()[source]
test_rapid_solicit_message()[source]
test_reject_unicast_message()[source]
test_request_message()[source]
test_solicit_message()[source]
test_very_rapid_solicit_message()[source]
test_worker_init()[source]