fix tests: update merge tests for private→unlisted rename and client-side filtering
This commit is contained in:
+6
-4
@@ -88,7 +88,7 @@ def test_apply_sidecar_body_takes_precedence_over_fm_description():
|
|||||||
|
|
||||||
def test_apply_sidecar_private_flag():
|
def test_apply_sidecar_private_flag():
|
||||||
result = apply_sidecar(BASE_DETAIL, {"private": True}, "")
|
result = apply_sidecar(BASE_DETAIL, {"private": True}, "")
|
||||||
assert result["privacy"] == "private"
|
assert result["privacy"] == "unlisted"
|
||||||
|
|
||||||
|
|
||||||
def test_apply_sidecar_highlight():
|
def test_apply_sidecar_highlight():
|
||||||
@@ -177,9 +177,11 @@ def test_merge_all_private_filtered_from_index(data_dir):
|
|||||||
merge_all(data_dir)
|
merge_all(data_dir)
|
||||||
|
|
||||||
index = json.loads((data_dir / "_merged" / "index.json").read_text())
|
index = json.loads((data_dir / "_merged" / "index.json").read_text())
|
||||||
ids = [a["id"] for a in index["activities"]]
|
activities = {a["id"]: a for a in index["activities"]}
|
||||||
assert "2024-01-01T080000Z-morning-ride" not in ids
|
# unlisted activities are kept in the index; filtering is client-side
|
||||||
assert "2024-01-02T090000Z-easy-run" in ids
|
assert "2024-01-01T080000Z-morning-ride" in activities
|
||||||
|
assert activities["2024-01-01T080000Z-morning-ride"]["privacy"] == "unlisted"
|
||||||
|
assert "2024-01-02T090000Z-easy-run" in activities
|
||||||
|
|
||||||
|
|
||||||
def test_merge_all_highlight_sorts_first(data_dir):
|
def test_merge_all_highlight_sorts_first(data_dir):
|
||||||
|
|||||||
Reference in New Issue
Block a user