Пример #1
0
    def test_is_reserved_v6(self) -> None:
        """
        Tests the method which let us check if the given subject is reserved.
        """

        ip_checker = IPSyntaxChecker()

        expected = True

        for subject in pyf_test_dataset.RESERVED_IPV6:
            ip_checker.subject = subject
            actual = ip_checker.is_reserved()

            self.assertEqual(expected, actual, subject)
Пример #2
0
    def test_is_not_reserved_v4(self) -> None:
        """
        Tests the method which let us check if the given subject is valid for
        the case that the given subject is not reserved.
        """

        ip_checker = IPSyntaxChecker()

        expected = False

        for subject in pyf_test_dataset.NOT_RESERVED_IPV4:
            ip_checker.subject = subject
            actual = ip_checker.is_reserved()

            self.assertEqual(expected, actual, subject)