Skip to content

Commit d16b020

Browse files
committed
fixed broken tests
1 parent 586f682 commit d16b020

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

functions-python/tasks_executor/tests/tasks/bounding_boxes/test_rebuild_missing_bounding_boxes.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,19 @@ def test_rebuild_missing_bounding_boxes_dry_run(self, mock_query):
6161
"tasks.missing_bounding_boxes.rebuild_missing_bounding_boxes.get_feeds_with_missing_bounding_boxes_query"
6262
)
6363
def test_rebuild_missing_bounding_boxes_publish(self, mock_query, mock_publish):
64+
# Mock Gtfsdataset and Gtfsfeed objects
65+
mock_dataset = MagicMock()
66+
mock_dataset.latest = True
67+
mock_dataset.stable_id = "dataset1"
68+
mock_dataset.hosted_url = "http://example.com/dataset1"
69+
mock_feed = MagicMock()
70+
mock_feed.stable_id = "feed1"
71+
mock_feed.gtfsdatasets = [mock_dataset]
72+
6473
mock_query.return_value.filter.return_value = mock_query.return_value
65-
mock_query.return_value.all.return_value = [("feed1", "dataset1")]
74+
mock_query.return_value.all.return_value = [mock_feed]
6675
mock_publish.return_value = None
76+
6777
result = rebuild_missing_bounding_boxes(
6878
dry_run=False, after_date=None, db_session=MagicMock()
6979
)

0 commit comments

Comments
 (0)