Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/initializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def init_hypertables():

def init_lexicon(path=None):
if path is None:
path = Path("..") / "core" / "lexicon.json"
path = Path(__file__).parent / "lexicon.json"

with open(path) as f:
import json
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@pytest.fixture(scope="session")
def location():
with session_ctx() as session:
loc = Location(point="SRID=4326;POINT(0 0)")
loc = Location(point="SRID=4326;POINT(0 0 0)")
session.add(loc)
session.commit()
session.refresh(loc)
Expand All @@ -22,7 +22,7 @@ def second_location():
with session_ctx() as session:
location = Location(
name="second location",
point="POINT (10.2 10.2)",
point="POINT (10.2 10.2 0)",
release_status="draft",
)
session.add(location)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_geospatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def populate():

loc1 = Location(
name="Test Location 1",
point=geofunc.ST_GeomFromText("POINT(10.1 10.1)", srid=4326),
point=geofunc.ST_GeomFromText("POINT(10.1 10.1 0)", srid=4326),
)
loc2 = Location(
name="Test Location 2",
point=geofunc.ST_GeomFromText("POINT(20 20)", srid=4326),
point=geofunc.ST_GeomFromText("POINT(20 20 0)", srid=4326),
)
session.add(loc1)
session.add(loc2)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def override_dependencies_fixture():
def test_add_location():
payload = {
"name": "test location",
"point": "POINT (10.1 10.1)",
"point": "POINT Z (10.1 10.1 0)",
"release_status": "draft",
}
response = client.post("/location", json=payload)
Expand All @@ -64,7 +64,7 @@ def test_add_location():

def test_update_location(location):
payload = {
"point": "POINT (10.1 20.2)",
"point": "POINT Z (10.1 20.2 0)",
"release_status": "draft",
"name": "patched name",
}
Expand Down
Loading