Example #1
0
    def test_is_valid_range_v6(self) -> None:
        """
        Tests the method which let us check if the given subject is valid range.
        """

        ip_checker = IPSyntaxChecker()

        expected = True

        for subject in pyf_test_dataset.VALID_IPV6_RANGES:
            ip_checker.subject = subject
            actual = ip_checker.is_valid_range()

            self.assertEqual(expected, actual, subject)
Example #2
0
    def test_is_not_valid_range_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 a valid range.
        """

        ip_checker = IPSyntaxChecker()

        expected = False

        for subject in pyf_test_dataset.NOT_VALID_IPV4_RANGES:
            ip_checker.subject = subject
            actual = ip_checker.is_valid_range()

            self.assertEqual(expected, actual, subject)