def test_it_should_assert_not_has_layer_for_invalid_arguments(self): try: assertions.assertNotHasLayer(ICMPv6ParamProblem, IPv6() / ICMPv6ParamProblem()) self.fail( '"::1 > ::1 (58) / ICMPv6ParamProblem" has layer ICMPv6ParamProblem' ) except assertions.AssertionFailedError, e: self.assertEqual( 'expected "::1 > ::1 (58) / ICMPv6ParamProblem" not to have layer ICMPv6ParamProblem', e.message)
def test_it_should_assert_not_has_layer_for_valid_arguments(self): self.assertEqual( True, assertions.assertNotHasLayer(ICMPv6ParamProblem, IPv6() / ICMPv6EchoRequest()), 'did not identify that IPv6()/ICMPv6EchoRequest packet does not have ICMPv6ParamProblem layer' )