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