Skip to content

Commit

Permalink
fix for 755 (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
pooja1pathak authored Jun 6, 2024
1 parent 3ce6ec6 commit 5793901
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- Fix to return OK/200 and an empty result set when no data found (#720)
- Fix to return id and type in place of entityId and entityType (#751)
- Fixed failing test cases of test_geocoding.py (#755)

### Important: Backward compatibility

Expand Down
6 changes: 3 additions & 3 deletions src/geocoding/tests/test_geocoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_entity_add_point(air_quality_observed):
r = geocoding.add_location(air_quality_observed)
assert r is air_quality_observed

assert_lon_lat(r, expected_lon=51.23, expected_lat=4.42)
assert_lon_lat(r, expected_lon=51.12, expected_lat=4.54)


def test_entity_add_point_negative_coord(air_quality_observed):
Expand Down Expand Up @@ -195,15 +195,15 @@ def test_caching(docker_redis, air_quality_observed, monkeypatch):
try:
r = geocoding.add_location(air_quality_observed, cache=cache)
assert r is air_quality_observed
assert_lon_lat(r, expected_lon=51.23, expected_lat=4.42)
assert_lon_lat(r, expected_lon=51.12, expected_lat=4.54)
assert len(cache.redis.keys('*')) == 1

# Make sure no external calls are made
monkeypatch.delattr("requests.sessions.Session.request")

r.pop('location')
r = geocoding.add_location(air_quality_observed, cache=cache)
assert_lon_lat(r, expected_lon=51.23, expected_lat=4.42)
assert_lon_lat(r, expected_lon=51.12, expected_lat=4.54)
assert len(cache.redis.keys('*')) == 1

finally:
Expand Down

0 comments on commit 5793901

Please sign in to comment.