MCPcopy
hub / github.com/lektor/lektor / test_editor_data_items

Function test_editor_data_items

tests/test_editor.py:219–234  ·  view source on GitHub ↗
(editor_data)

Source from the content-addressed store, hash-verified

217
218
219def test_editor_data_items(editor_data):
220 assert list(editor_data.items(fallback=False)) == [
221 ("item1", "value1"),
222 ]
223 assert ("item2", "fallback2") not in editor_data.items(fallback=False)
224 assert len(editor_data.items(fallback=False)) == 1
225
226 editor_data["item3"] = "x3"
227 assert list(editor_data.items()) == [
228 ("item1", "value1"),
229 ("item2", "fallback2"),
230 ("item3", "x3"),
231 ]
232 assert ("item2", "fallback2") in editor_data.items()
233 assert ("item3", "x3") in editor_data.items()
234 assert len(editor_data.items()) == 3
235
236
237def test_editor_data_values(editor_data):

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected