INNER CODE UNIT · Python

json

Fausto-404/js-reverse-automation--skill · js-reverse-automation/scripts/check_delivery_contract.py:29

        def json(self) -> dict[str, Any]:
            return {"data": {"requestBody": "loginId=admin&password2=ENC"}}

    def fake_get(url: str, **_: Any) -> FakeResponse:
        calls.append(url)
        return FakeResponse()

    original_get = module.requests.get
    try:
        module.requests.get = fake_get
        transform = module.CONFIG["transforms"][0]
        module.jsrpc_call(transform.get("action", module.CONFIG["jsrpc"]["action"]), "123456", transform)
    finally:
        module.requests.get = original_get

    if len(calls) != 1 or not calls[0].endswith("/go") or calls[0].endswith("/go/go"):
        raise AssertionError(f"JSRPC endpoint 归一化失败:{calls}")
    return {"ok": True, "called": calls[0]}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…