Skip to content

Commit b452ad4

Browse files
committed
fix failing test and remove arg from call
1 parent 576a5e0 commit b452ad4

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

functions-python/reverse_geolocation/src/reverse_geolocation_processor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ def reverse_geolocation_process(
377377
create_geojson_aggregate(
378378
list(location_groups.values()),
379379
total_stops=total_stops,
380-
stable_id=stable_id,
381380
bounding_box=bounding_box,
382381
data_type=data_type,
383382
extraction_urls=extraction_urls,

functions-python/update_feed_status/tests/conftest.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
from datetime import datetime, timedelta
1818
from uuid import uuid4
1919

20+
import pytest
21+
2022
from shared.database.database import with_db_session
2123
from shared.database_gen.sqlacodegen_models import (
2224
Feed,
@@ -57,7 +59,7 @@ def populate_database(db_session):
5759
db_session.add(
5860
Feed(id=str(_id), status=status, stable_id="mdb-" + str(_id))
5961
)
60-
62+
db_session.flush()
6163
# -> inactive
6264
for _id in [
6365
"0", # already inactive
@@ -87,6 +89,7 @@ def populate_database(db_session):
8789
db_session.commit()
8890

8991

90-
def pytest_sessionstart(session):
92+
@pytest.fixture(autouse=True)
93+
def setup():
9194
clean_testing_db()
9295
populate_database()

functions-python/update_feed_status/tests/test_update_feed_status_main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from unittest.mock import patch, MagicMock
22

3-
from conftest import clean_testing_db, populate_database
43
from shared.database.database import with_db_session
54
from test_shared.test_utils.database_utils import default_db_url
65
from main import (
@@ -64,8 +63,8 @@ def test_update_feed_status(db_session: Session) -> None:
6463

6564
@with_db_session(db_url=default_db_url)
6665
def test_update_feed_status_with_ids(db_session: Session) -> None:
67-
clean_testing_db()
68-
populate_database()
66+
# clean_testing_db()
67+
# populate_database()
6968
feeds_before: dict[str, PartialFeed] = {f.id: f for f in fetch_feeds(db_session)}
7069
result = dict(update_feed_statuses_query(db_session, ["mdb-8"]))
7170
assert result == {

0 commit comments

Comments
 (0)