mentat.services.test_geoip module

Unit test module for testing the mentat.services.geoip module.

class mentat.services.test_geoip.TestMentatGeoip(methodName='runTest')[source]

Bases: unittest.case.TestCase

Unit test class for testing the mentat.services.geoip module.

geoip_test_list = [['195.113.144.233', {'asn': {'asn': 2852, 'ip': '195.113.144.233', 'org': 'CESNET z.s.p.o.'}, 'city': {'accuracy': 100, 'cnt_code': 'EU', 'cnt_name': 'Europe', 'ctr_code': 'CZ', 'ctr_name': 'Czechia', 'cty_name': None, 'ip': '195.113.144.233', 'timezone': 'Europe/Prague'}, 'country': {'cnt_code': 'EU', 'cnt_name': 'Europe', 'ctr_code': 'CZ', 'ctr_name': 'Czechia', 'ip': '195.113.144.233'}}]]
setUp()[source]

Perform test case setup.

test_01_lookup_asn()[source]

Perform ASN lookup tests.

test_02_lookup_city()[source]

Perform city lookup tests.

test_03_lookup_country()[source]

Perform country lookup tests.

test_04_lookup()[source]

Perform full lookup tests with manually configured geoip service.

test_05_service_manager()[source]

Perform full lookup tests with service obtained by manually configured service manager.

test_06_module_service()[source]

Perform full lookup tests with service obtained by module interface.

verbose = True