|
@@ -3,6 +3,7 @@ from app.email_utils import (
|
|
get_email_part,
|
|
get_email_part,
|
|
get_email_local_part,
|
|
get_email_local_part,
|
|
get_email_domain_part,
|
|
get_email_domain_part,
|
|
|
|
+ email_belongs_to_alias_domains,
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
@@ -26,3 +27,12 @@ def test_get_email_local_part():
|
|
|
|
|
|
def test_get_email_domain_part():
|
|
def test_get_email_domain_part():
|
|
assert get_email_domain_part("ab@cd.com") == "cd.com"
|
|
assert get_email_domain_part("ab@cd.com") == "cd.com"
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+def test_email_belongs_to_alias_domains():
|
|
|
|
+ # default alias domain
|
|
|
|
+ assert email_belongs_to_alias_domains("ab@sl.local")
|
|
|
|
+ assert not email_belongs_to_alias_domains("ab@not-exist.local")
|
|
|
|
+
|
|
|
|
+ assert email_belongs_to_alias_domains("hey@d1.test")
|
|
|
|
+ assert not email_belongs_to_alias_domains("hey@d3.test")
|