................................................................F....... [ 81%]
................                                                         [100%]
=================================== FAILURES ===================================
__________ test_graph_history_shape_and_binding_refuse[empty_node-0] ___________

i = 0, kind = 'empty_node'

    @pytest.mark.parametrize("i", [0])
    @pytest.mark.parametrize(
        "kind",
        [
            "edge",
            "mode",
            "version",
            "history",
            "missing",
            "null",
            "list",
            "object",
            "swap",
            "source_sha",
            "citation",
            "ue",
            "empty_node",
            "reference",
            "preview_missing",
            "preview_null",
            "preview_object",
        ],
    )
    def test_graph_history_shape_and_binding_refuse(i, kind):
        s, r = copy.deepcopy(SOURCES[i]), copy.deepcopy(REVIEWS[i])
        b = r["fixed_version_document"]
        if kind == "edge":
            s["links"][0][1] = 999
        elif kind == "mode":
            s["nodes"][0]["mode"] = 2
        elif kind == "version":
            s["nodes"][0]["properties"]["ver"] = "forged"
        elif kind == "history":
            next(n for n in s["nodes"] if n["id"] == 4)["widgets_values"]["videopreview"]["params"][
                "filename"
            ] = "forged"
        elif kind in ["missing", "null", "list", "object"]:
            values = next(n for n in s["nodes"] if n["id"] == 4)["widgets_values"]
            if kind == "missing":
                del values["videopreview"]
            else:
                values["videopreview"] = {"null": None, "list": [], "object": {}}[kind]
        elif kind == "swap":
            r = copy.deepcopy(
                review_for(
                    next(p for p in DEFINITIONS if p.endswith("视频倒放.json")),
                    hashlib.sha1(
                        (
                            REPO / next(p for p in DEFINITIONS if p.endswith("视频倒放.json"))
                        ).read_bytes()
                    ).hexdigest(),
                )
            )
        elif kind == "source_sha":
            r["source_sha"] = "0" * 40
        elif kind == "ue":
            s["extra"]["ue_links"] = [1]
        elif kind == "empty_node":
>           next(n for n in s["nodes"] if n["id"] == 50)["widgets_values"] = []
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           StopIteration

calliope-backend/tests/test_latent_fixed_document.py:145: StopIteration
=========================== short test summary info ============================
FAILED calliope-backend/tests/test_latent_fixed_document.py::test_graph_history_shape_and_binding_refuse[empty_node-0]
1 failed, 87 passed, 1 warning in 0.25s
