예제 #1
0
def test_domain_is_email():
    assert not validate_string.is_domain("*****@*****.**")
예제 #2
0
def test_domain_length_is_less_or_equal_253():
    long_domain = "nqnwsjlgxuywzojugeagcfbphrvgacffmuqppnehpzenoixzplrwmhisoytxfgsbarqgrcgqqblyhrdxfqzeirzojyrgjtbfapnzkguqzhyuirazmymxakypbwulmuxcjcfxkhgcgbivohcbxvvkgczaqdoekepwzcxkciwjdpkrdaqdywezqauskkfhmgjubmxhddcbqjvimeqfgjnwhxeufqamrlfxddmlkeonbwmwiypnknmqbclsgm.tlo"
    assert not validate_string.is_domain(long_domain)
예제 #3
0
def test_domain_without_protocol():
    assert not validate_string.is_domain("http://example.com")
예제 #4
0
def test_domain_ending_with_non_char():
    assert not validate_string.is_domain("example.com@")
예제 #5
0
def test_domain_starting_with_non_char():
    assert not validate_string.is_domain("-example.com")
예제 #6
0
def test_valid_domain_with_dash():
    assert validate_string.is_domain("some-example.com")
예제 #7
0
def test_valid_subdomain():
    assert validate_string.is_domain("sub.example.com")