Skip to content

Commit

Permalink
fix: Fix geoip not containing postal_code for UK (#19307)
Browse files Browse the repository at this point in the history
  • Loading branch information
webjunkie authored Dec 13, 2023
1 parent 5583607 commit cab8aea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions posthog/api/test/test_geoip.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
@pytest.mark.parametrize(
"test_input,expected",
[
(australia_ip, "Australia"),
(uk_ip, "United Kingdom"),
(us_ip_v6, "United States"),
(australia_ip, ("Australia", 6)),
(uk_ip, ("United Kingdom", 5)),
(us_ip_v6, ("United States", 6)),
],
)
def test_geoip_results(test_input, expected):
properties = get_geoip_properties(test_input)
assert properties["$geoip_country_name"] == expected
assert len(properties) == 6
name, length = expected
assert properties["$geoip_country_name"] == name
assert len(properties) == length


class TestGeoIPDBError(TestCase):
Expand Down

0 comments on commit cab8aea

Please sign in to comment.