Skip to content
Snippets Groups Projects
Commit e5c03665 authored by Tom Hendrikx's avatar Tom Hendrikx Committed by Stuart D. Gathman
Browse files

Fixes (#8)

* Fix tests that fail

Solves #5

* FIx syntax errors
parent ea9ca0c1
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ def iniplist(ipaddr,iplist):
True
>>> iniplist('4.2.2.2',['b.resolvers.Level3.net'])
True
>>> iniplist('2607:f8b0:4004:801::',['google.com/40'])
>>> iniplist('2606:2800:220:1:248:1893:25c8:1946',['example.com/64'])
True
>>> iniplist('4.2.2.2',['nothing.example.com'])
False
......@@ -135,7 +135,7 @@ def parseaddr(t):
>>> parseaddr('Real Name ((comment)) <addr...@example.com>')
('Real Name (comment)', 'addr...@example.com')
>>> parseaddr('a(WRONG)@b')
('WRONG', 'a@b')
('WRONG WRONG', 'a@b')
"""
#return email.utils.parseaddr(t)
res = email.utils.parseaddr(t)
......
......@@ -14,7 +14,7 @@ internal_tlds = ["corp", "personal"]
# True if internal, False otherwise
def is_internal(hostname):
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
# of hostnames
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment