diff --git a/tests/test_resolver.py b/tests/test_resolver.py index 0e3a261..c434a98 100644 --- a/tests/test_resolver.py +++ b/tests/test_resolver.py @@ -15,6 +15,7 @@ def test_geonames_query(): place_type = "city" coordinates = resolver.resolve(place_name, country_code, place_type) - assert coordinates[0] is not None, "Coordinates should not be None" - assert isinstance(coordinates, tuple), "Coordinates should be a tuple" - assert len(coordinates) == 2, "Coordinates should contain latitude and longitude" \ No newline at end of file + assert coordinates is not None, "1. Coordinates should not be None" + assert isinstance(coordinates, dict), "2. Coordinates should be a dict" + assert "latitude" in coordinates and "longitude" in coordinates, "3. Coordinates should contain latitude and longitude" + assert coordinates["latitude"] == 40.71427 and coordinates["longitude"] == -74.00597, f"4. Coordinates {coordinates} do not match expected values for New York, US" \ No newline at end of file