* Fix tests that fail

Solves #5

* FIx syntax errors
This commit is contained in:
Tom Hendrikx
2016-10-18 05:23:55 +02:00
committed by Stuart D. Gathman
parent ea9ca0c12a
commit e5c03665e9
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ def iniplist(ipaddr,iplist):
True True
>>> iniplist('4.2.2.2',['b.resolvers.Level3.net']) >>> iniplist('4.2.2.2',['b.resolvers.Level3.net'])
True True
>>> iniplist('2607:f8b0:4004:801::',['google.com/40']) >>> iniplist('2606:2800:220:1:248:1893:25c8:1946',['example.com/64'])
True True
>>> iniplist('4.2.2.2',['nothing.example.com']) >>> iniplist('4.2.2.2',['nothing.example.com'])
False False
@@ -135,7 +135,7 @@ def parseaddr(t):
>>> parseaddr('Real Name ((comment)) <addr...@example.com>') >>> parseaddr('Real Name ((comment)) <addr...@example.com>')
('Real Name (comment)', 'addr...@example.com') ('Real Name (comment)', 'addr...@example.com')
>>> parseaddr('a(WRONG)@b') >>> parseaddr('a(WRONG)@b')
('WRONG', 'a@b') ('WRONG WRONG', 'a@b')
""" """
#return email.utils.parseaddr(t) #return email.utils.parseaddr(t)
res = email.utils.parseaddr(t) res = email.utils.parseaddr(t)
+1 -1
View File
@@ -14,7 +14,7 @@ internal_tlds = ["corp", "personal"]
# True if internal, False otherwise # True if internal, False otherwise
def is_internal(hostname): def is_internal(hostname):
components = hostname.split(".") components = hostname.split(".")
return components.pop() in internal_tlds: return components.pop() in internal_tlds
# Determine if internal and external hosts are mixed based on a list # Determine if internal and external hosts are mixed based on a list
# of hostnames # of hostnames