@@ -201,6 +201,11 @@ def test_build_bundles(mock_fetch_all_changesets, mock_write_zip, mock_sync_clou
201201 "metadata": {"id": "collection5", "bucket": "bucket5", "flags": ["startup"]},
202202 "timestamp": 1720004688000 + 10,
203203 },
204+ { # collection with startup flag but preview bucket
205+ "changes": [{"id": "record5"}],
206+ "metadata": {"id": "collection5", "bucket": "preview-bucket5", "flags": ["startup"]},
207+ "timestamp": 1720004688000 + 10,
208+ },
204209 { # collection newly marked as bundled
205210 "changes": [{"id": "record5"}],
206211 "metadata": {"id": "collection6", "bucket": "bucket6", "attachment": {"bundle": True}},
@@ -231,13 +236,14 @@ def test_build_bundles(mock_fetch_all_changesets, mock_write_zip, mock_sync_clou
231236 # Assert the second call (changesets.zip)
232237 changesets_zip_path, changesets_zip_files = calls[1][0]
233238 assert changesets_zip_path == "changesets.zip"
234- assert len(changesets_zip_files) == 7
239+ assert len(changesets_zip_files) == 8
235240 assert changesets_zip_files[0][0] == "bucket0--collection0.json"
236241 assert changesets_zip_files[1][0] == "bucket1--collection1.json"
237242 assert changesets_zip_files[2][0] == "bucket2--collection2.json"
238243 assert changesets_zip_files[3][0] == "bucket3--collection3.json"
239244 assert changesets_zip_files[4][0] == "bucket4--collection4.json"
240245 assert changesets_zip_files[5][0] == "bucket5--collection5.json"
246+ assert changesets_zip_files[6][0] == "preview-bucket5--collection5.json"
241247
242248 # Assert the third call (startup.zip)
243249 startup_zip_path, startup_zip_files = calls[2][0]
@@ -257,6 +263,7 @@ def test_build_bundles(mock_fetch_all_changesets, mock_write_zip, mock_sync_clou
257263 "bucket2--collection2.zip",
258264 "bucket3--collection3.zip",
259265 "bucket5--collection5.zip",
266+ "preview-bucket5--collection5.zip",
260267 "bucket6--collection6.zip",
261268 ],
262269 )
0 commit comments