示例#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")