Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test():
"""geo_lookup.py test"""
# Execute the worker (unit test)
geo_lookup = GeoLookup(summary=False)
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test FULL>>>')
pprint.pprint(output)
geo_lookup = GeoLookup()
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test Summary>>>')
pprint.pprint(output)
output = geo_lookup.query_ip('123.4.5.6')
print('\n<<< Unit Test Summary>>>')
pprint.pprint(output)
# Test Cache
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test Cache>>>')
pprint.pprint(output)
def test():
"""geo_lookup.py test"""
# Execute the worker (unit test)
geo_lookup = GeoLookup(summary=False)
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test FULL>>>')
pprint.pprint(output)
geo_lookup = GeoLookup()
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test Summary>>>')
pprint.pprint(output)
output = geo_lookup.query_ip('123.4.5.6')
print('\n<<< Unit Test Summary>>>')
pprint.pprint(output)
# Test Cache
output = geo_lookup.query_ip('73.26.145.66')
print('\n<<< Unit Test Cache>>>')
pprint.pprint(output)
# Test Size
assert geo_lookup.size == 2
# Test some error conditions