Skip to content
Snippets Groups Projects
Commit 42279600 authored by Jan Mach's avatar Jan Mach
Browse files

Small tweaks in whois module unit test file.

(Redmine issue: #1017)
parent 2fd92909
No related branches found
No related tags found
No related merge requests found
......@@ -185,9 +185,40 @@ class TestMentatWhois(unittest.TestCase):
#pprint(mod)
#pprint(mod.networks_ip4)
print('LOOKUP 03-01')
pprint(whois.lookup('146.102.0.40'))
print('LOOKUP 03-02')
pprint(whois.lookup('195.113.134.183'))
print('LOOKUP 03-03')
pprint(whois.lookup('2001:718:1:6::134:183'))
print('LOOKUP 03-04')
pprint(whois.lookup_abuse('195.113.134.183'))
print('LOOKUP 03-05')
pprint(whois.lookup_abuse('2001:718:1:6::134:183'))
def test_04_file(self):
"""
Perform basic operativity tests.
"""
self.maxDiff = None
whois = mentat.whois.WhoisService([
mentat.whois.FileWhoisModule('/var/mentat/whois-exceptions.json').setup(),
mentat.whois.FileWhoisModule('/var/mentat/whois-negistry.json').setup()
])
#for mod in whois.modules:
#pprint(mod)
#pprint(mod.networks_ip4)
print('LOOKUP 04-01')
pprint(whois.lookup('146.102.0.40'))
print('LOOKUP 04-02')
pprint(whois.lookup('195.113.134.183'))
print('LOOKUP 04-03')
pprint(whois.lookup('2001:718:1:6::134:183'))
print('LOOKUP 04-04')
pprint(whois.lookup_abuse('195.113.134.183'))
print('LOOKUP 04-05')
pprint(whois.lookup_abuse('2001:718:1:6::134:183'))
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment