Skip to content

Commit

Permalink
more unittest work
Browse files Browse the repository at this point in the history
  • Loading branch information
un33k committed Oct 15, 2012
1 parent 04fbc50 commit 2a2d39e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion emailahoy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def not_found(self, resp):
"invalid",
"doesn't handle",
]
return resp[0] != 250 and any(a in resp[1].lower() for a in not_found_words):
return resp[0] != 250 and any(a in resp[1].lower() for a in not_found_words)


# given a response tuple, it returns true if it couldn't tell, if email found or not
Expand Down
14 changes: 7 additions & 7 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setUp(self):
def test_class_based_invalid_email(self):
""" Test the existance of an invalid email address (class based)"""

email = 'non-existing-email@gmail.com'
email = 'non-existing-email@cnn.com'
self.log.debug("Testing classy invalid email address (%s)" % email)

status = self.e.verify_email_smtp(
Expand All @@ -33,10 +33,10 @@ def test_class_based_invalid_email(self):
def test_class_based_valid_email(self):
""" Test the existance of a valid email address (class based)"""

email = 'info@neekware.com'
email = 'vinnie@cnn.com'
self.log.debug("Testing classy valid email address (%s)" % email)
status = self.e.verify_email_smtp(
email='info@neekware.com',
email=email,
from_host='neekware.com',
from_email='info@neekware.com'
)
Expand All @@ -47,7 +47,7 @@ def test_class_based_valid_email(self):
def test_function_based_invalid_email(self):
""" Test the existance of an invalid email address (function based)"""

email = 'non-existing-email@gmail.com'
email = 'non-existing-email@cnn.com'
self.log.debug("Testing invalid email address (%s)" % email)

found = verify_email_address(
Expand All @@ -63,7 +63,7 @@ def test_function_based_invalid_email(self):
def test_function_based_valid_email(self):
""" Test the existance of a valid email address (function based)"""

email = 'info@neekware.com'
email = 'vinnie@cnn.com'
self.log.debug("Testing valid email address (%s)" % email)

found = verify_email_address(
Expand All @@ -87,10 +87,10 @@ def test_mx_query_invalid_domain(self):
def test_mx_query_valid_domain(self):
""" Query mx of a valid domain name """

domain = 'gmail.com'
domain = 'cnn.com'
self.log.debug("Testing MX Query for valid domain (%s)" % domain)

mx = query_mx('gmail.com')
mx = query_mx(domain)
self.assertNotEqual(len(mx), 0)


Expand Down

0 comments on commit 2a2d39e

Please sign in to comment.