Skip to content

Commit

Permalink
test: fix teardown of db fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasschaub committed Jul 15, 2024
1 parent 06720e8 commit f27db34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/test_database_client_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@pytest.fixture
def map_frame_old(flask_app, uuid_create, map_frame):
def map_frame_old(flask_app, uuid_create, map_frame, bbox):
"""Mock map frame which is uploaded a year ago."""
# NOTE: Maybe mocking a map frame in the database with fake file
with flask_app.app_context():
Expand All @@ -26,9 +26,9 @@ def map_frame_old(flask_app, uuid_create, map_frame):

map_frame.seek(0)
with flask_app.app_context():
update_query = "UPDATE map_frame SET file = %s WHERE uuid = %s"
update_query = "UPDATE map_frame SET file = %s, bbox = %s WHERE uuid = %s"
with client_flask.open_connection().cursor() as curs:
curs.execute(update_query, [map_frame.getvalue(), uuid_create])
curs.execute(update_query, [map_frame.getvalue(), str(bbox), uuid_create])
map_frame.seek(0)


Expand Down

0 comments on commit f27db34

Please sign in to comment.