diff options
| author | Yuval Adam <_@yuv.al> | 2020-09-28 22:05:05 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2020-09-28 22:05:05 +0300 |
| commit | d5cf61d168bdbcf05032d5a8003e61386ae8deb2 (patch) | |
| tree | aeaf99cde2a147511f06d9d53a652c7b8374e86f /iss/tests/test_geoip.py | |
| parent | c81aeba984b08957614f7167cdbdea8780e76a11 (diff) | |
Finalize geo parsing from IP
Diffstat (limited to 'iss/tests/test_geoip.py')
| -rw-r--r-- | iss/tests/test_geoip.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/iss/tests/test_geoip.py b/iss/tests/test_geoip.py deleted file mode 100644 index aa3f37d..0000000 --- a/iss/tests/test_geoip.py +++ /dev/null @@ -1,19 +0,0 @@ -import pytest -import geoip2.database - -from ..config import GEOIP_CITY_PATH - -geoip_required = pytest.mark.skipif( - not GEOIP_CITY_PATH, reason="Path to GeoLite2 city database must be provided" -) - - -@geoip_required -def test_geo(): - ip = "2.52.2.52" - with geoip2.database.Reader(GEOIP_CITY_PATH) as reader: - res = reader.city(ip) - location = res.location - assert location.latitude == 31.5 - assert location.longitude == 34.75 - assert location.time_zone == "Asia/Jerusalem" |
