Permalink
Browse files

more unittest work

  • Loading branch information...
Val Neekman
Val Neekman committed Oct 15, 2012
1 parent 04fbc50 commit 2a2d39ed885b7498c4e98f109de3d4113e2c2c1c
Showing with 8 additions and 8 deletions.
  1. +1 −1 emailahoy/__init__.py
  2. +7 −7 test.py
View
@@ -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
View
14 test.py
@@ -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(
@@ -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'
)
@@ -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(
@@ -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(
@@ -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)

0 comments on commit 2a2d39e

Please sign in to comment.