MCPcopy
hub / github.com/lektor/lektor / scratch_project_data

Function scratch_project_data

tests/test_environment.py:14–20  ·  view source on GitHub ↗
(scratch_project_data)

Source from the content-addressed store, hash-verified

12
13@pytest.fixture
14def scratch_project_data(scratch_project_data):
15 # Add a sub-page to the scratch project
16 data = {"_model": "page", "title": "Subpage", "body": "Subpage body"}
17 subpage_lr = scratch_project_data / "content/sub-page/contents.lr"
18 subpage_lr.dirpath().ensure_dir()
19 subpage_lr.write_text("".join(lektor.metaformat.serialize(data.items())), "utf-8")
20 return scratch_project_data
21
22
23@pytest.fixture

Callers

nothing calls this directly

Calls 2

ensure_dirMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected