Rename _*_id columns into just *_id
This commit is contained in:
parent
078355897a
commit
daa224d041
9 changed files with 38 additions and 58 deletions
|
|
@ -12,12 +12,12 @@ def city_data():
|
|||
'id': 1,
|
||||
'name': 'Paris',
|
||||
'kml': "<?xml version='1.0' encoding='UTF-8'?> ...",
|
||||
'_center_latitude': 48.856614,
|
||||
'_center_longitude': 2.3522219,
|
||||
'_northeast_latitude': 48.9021449,
|
||||
'_northeast_longitude': 2.4699208,
|
||||
'_southwest_latitude': 48.815573,
|
||||
'_southwest_longitude': 2.225193,
|
||||
'center_latitude': 48.856614,
|
||||
'center_longitude': 2.3522219,
|
||||
'northeast_latitude': 48.9021449,
|
||||
'northeast_longitude': 2.4699208,
|
||||
'southwest_latitude': 48.815573,
|
||||
'southwest_longitude': 2.225193,
|
||||
'initial_zoom': 12,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ class TestProperties:
|
|||
result = city.center
|
||||
|
||||
assert isinstance(result, utils.Location)
|
||||
assert result.latitude == pytest.approx(city_data['_center_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['_center_longitude'])
|
||||
assert result.latitude == pytest.approx(city_data['center_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['center_longitude'])
|
||||
|
||||
def test_center_is_cached(self, city):
|
||||
"""Test `City.center` property."""
|
||||
|
|
@ -59,8 +59,8 @@ class TestProperties:
|
|||
result = city.northeast
|
||||
|
||||
assert isinstance(result, utils.Location)
|
||||
assert result.latitude == pytest.approx(city_data['_northeast_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['_northeast_longitude'])
|
||||
assert result.latitude == pytest.approx(city_data['northeast_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['northeast_longitude'])
|
||||
|
||||
def test_northeast_is_cached(self, city):
|
||||
"""Test `City.northeast` property."""
|
||||
|
|
@ -74,8 +74,8 @@ class TestProperties:
|
|||
result = city.southwest
|
||||
|
||||
assert isinstance(result, utils.Location)
|
||||
assert result.latitude == pytest.approx(city_data['_southwest_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['_southwest_longitude'])
|
||||
assert result.latitude == pytest.approx(city_data['southwest_latitude'])
|
||||
assert result.longitude == pytest.approx(city_data['southwest_longitude'])
|
||||
|
||||
def test_southwest_is_cached(self, city):
|
||||
"""Test `City.southwest` property."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue