mirror of
https://github.com/simple-login/app.git
synced 2024-11-03 04:11:01 +01:00
31 lines
517 B
Python
31 lines
517 B
Python
from app.dns_utils import *
|
|
|
|
# use our own domain for test
|
|
_DOMAIN = "simplelogin.io"
|
|
|
|
|
|
def test_get_mx_domains():
|
|
r = get_mx_domains(_DOMAIN)
|
|
|
|
assert len(r) > 0
|
|
|
|
for x in r:
|
|
assert x[0] > 0
|
|
assert x[1]
|
|
|
|
|
|
def test_get_spf_domain():
|
|
r = get_spf_domain(_DOMAIN)
|
|
assert r == ["simplelogin.co"]
|
|
|
|
|
|
def test_get_txt_record():
|
|
|
|
r = get_txt_record(_DOMAIN)
|
|
assert len(r) > 0
|
|
|
|
|
|
def test_get_dkim_record():
|
|
r = get_dkim_record(_DOMAIN)
|
|
assert r.startswith("v=DKIM1; k=rsa;")
|