mirror of
https://github.com/Horizontal42/netsleuth.git
synced 2026-11-10 15:42:10 +03:00
test: expand coverage for colo_location
Added explicit tests for 'LHR' known code mapping, lowercase inputs ('dme'), and empty strings handling for edge cases.
Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
This commit is contained in:
parent
8c99ac78b7
commit
9fda89e8e1
1 changed files with 3 additions and 3 deletions
|
|
@ -45,9 +45,8 @@ def test_parse_cf_ray_trailing_dash_empty_suffix():
|
|||
|
||||
|
||||
def test_colo_location_known_code():
|
||||
city, country = colo_location("DME")
|
||||
assert country == "RU"
|
||||
assert city
|
||||
assert colo_location("LHR") == ("London", "GB")
|
||||
assert colo_location("dme") == ("Moscow", "RU")
|
||||
|
||||
|
||||
def test_colo_location_unknown_code():
|
||||
|
|
@ -56,6 +55,7 @@ def test_colo_location_unknown_code():
|
|||
|
||||
def test_colo_location_none():
|
||||
assert colo_location(None) == (None, None)
|
||||
assert colo_location("") == (None, None)
|
||||
|
||||
|
||||
def test_detect_international_loop_true_when_edge_diverges():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue