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
9 changes: 4 additions & 5 deletions tests/features/steps/api_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,17 @@
Thing,
LocationThingAssociation,
Sensor,
LexiconTerm,
Group,
GroupThingAssociation,
)
from db.engine import session_ctx

with session_ctx() as session:
if session.query(LexiconTerm).count() == 0:
erase_and_rebuild_db(session)
# if session.query(LexiconTerm).count() == 0:
erase_and_rebuild_db(session)

init_lexicon()
init_parameter()
init_lexicon()
init_parameter()


def add_location(lid):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@when('the user requests things with type "water well"')
def step_impl(context):
context.response = context.client.get("/thing", params={"thing_type": "water well"})
context.response = context.client.get("/thing/water-well")


@then("the response should include at least one thing")
Expand All @@ -37,7 +37,7 @@ def step_impl(context):

@when('the user requests things with type "spring"')
def step_impl(context):
context.response = context.client.get("/thing", params={"thing_type": "spring"})
context.response = context.client.get("/thing/spring")


@then('the response should only include things of type "spring"')
Expand Down
Loading