INNER CODE UNIT · Python
load_module
Fausto-404/js-reverse-automation--skill · js-reverse-automation/scripts/check_delivery_contract.py:13
def load_module(path: Path):
spec = importlib.util.spec_from_file_location("jsra_delivery_contract_proxy", path)
if spec is None or spec.loader is None:
raise RuntimeError(f"无法加载代理:{path}")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
return module
def check_endpoint_normalization(module) -> dict[str, Any]:
calls: list[str] = []
class FakeResponse:
def raise_for_status(self) -> None:
return None
def json(self) -> dict[str, Any]:
return {"data": {"requestBody": "loginId=admin&password2=ENC"}}