def test_parent_domain():
    assert parent_domain('x.a.com') == 'a.com'
    assert parent_domain('a.com') == 'a.com'
    assert parent_domain('.com') == ''
    assert parent_domain('test.google.com') == 'google.com'

    assert parent_domain('smtp.example.a.com') == parent_domain('imap.example.a.com')
    assert parent_domain('smtp.example.a.com') == parent_domain('imap.a.com')

    assert parent_domain('company.co.uk') != parent_domain('evilcompany.co.uk')
def test_parent_domain():
    assert parent_domain('x.a.com') == 'a.com'
    assert parent_domain('a.com') == 'a.com'
    assert parent_domain('.com') == ''
    assert parent_domain('test.google.com') == 'google.com'

    assert parent_domain('smtp.example.a.com') == parent_domain('imap.example.a.com')
    assert parent_domain('smtp.example.a.com') == parent_domain('imap.a.com')

    assert parent_domain('company.co.uk') != parent_domain('evilcompany.co.uk')
def test_parent_domain():
    assert parent_domain("x.a.com") == "a.com"
    assert parent_domain("a.com") == "a.com"
    assert parent_domain(".com") == ""
    assert parent_domain("test.google.com") == "google.com"

    assert parent_domain("smtp.example.a.com") == parent_domain(
        "imap.example.a.com")
    assert parent_domain("smtp.example.a.com") == parent_domain("imap.a.com")

    assert parent_domain("company.co.uk") != parent_domain("evilcompany.co.uk")