filtertestcase fixes from yarikoptic

pull/27/head
Lee Clemens 2012-01-10 21:09:58 -05:00
parent 6ce9d04640
commit 7957fbe821
1 changed files with 2 additions and 2 deletions

View File

@ -233,13 +233,13 @@ class DNSUtilsTests(unittest.TestCase):
def testTextToIp(self): def testTextToIp(self):
# Test hostnames # Test hostnames
hostnames = [ hostnames = [
'www.example.com' 'www.example.com',
'doh1.2.3.4.buga.xxxxx.yyy.invalid', 'doh1.2.3.4.buga.xxxxx.yyy.invalid',
'1.2.3.4.buga.xxxxx.yyy.invalid', '1.2.3.4.buga.xxxxx.yyy.invalid',
] ]
for s in hostnames: for s in hostnames:
res = DNSUtils.textToIp(s, 'yes') res = DNSUtils.textToIp(s, 'yes')
if s is 'www.example.com': if s == 'www.example.com':
self.assertEqual(res, ['192.0.43.10']) self.assertEqual(res, ['192.0.43.10'])
else: else:
self.assertEqual(res, []) self.assertEqual(res, [])