def test_is_not_valid(self) -> None: """ Tests the method which let us check if the given subject is valid for the case that the given subject is not valid. """ url_checker = URLSyntaxChecker() expected = False for subject in pyf_test_dataset.NOT_VALID_DOMAINS: url_checker.subject = f"{subject}/?is_admin=true" actual = url_checker.is_valid() self.assertEqual(expected, actual, subject)
def test_is_valid_subdomain(self) -> None: """ Tests the method which let us check if the given subject is valid for the case that a subdomain is given. """ url_checker = URLSyntaxChecker() expected = True for subject in pyf_test_dataset.VALID_SUBDOMAINS: url_checker.subject = f"https://{subject}/?is_admin=true" actual = url_checker.is_valid() self.assertEqual(expected, actual, subject)