* Fix tests that fail

Solves #5

* FIx syntax errors
This commit is contained in:
Tom Hendrikx authored and Stuart D. Gathman committed 2016-10-17 23:23:55 -04:00
1 parent ea9ca0c12a
commit e5c03665e9
2 files changed
+3 -3

No files matched your search

+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)) <[email protected]>') >>> parseaddr('Real Name ((comment)) <[email protected]>')
('Real Name (comment)', '[email protected]') ('Real Name (comment)', '[email protected]')
>>> 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