fix: stop shadowing json module in GlobalClient HTTP helper
Live VeraeTime token is stored in ~/.verae/auth.properties (not committed).
This commit is contained in:
parent
107fa785b0
commit
0714fff7fa
1 changed files with 19 additions and 17 deletions
|
|
@ -22,20 +22,20 @@ class FakeHttp:
|
|||
def __init__(self):
|
||||
self.calls: list[tuple[str, str, dict, dict]] = []
|
||||
|
||||
def request(self, method: str, url: str, json: dict, headers: dict) -> _Resp:
|
||||
self.calls.append((method, url, json, headers))
|
||||
def request(self, method: str, url: str, payload: dict, headers: dict) -> _Resp:
|
||||
self.calls.append((method, url, payload, headers))
|
||||
if url.endswith("/api/timestamp"):
|
||||
return _Resp(
|
||||
200,
|
||||
{
|
||||
"jobId": "job-1",
|
||||
"hash": json["hash"],
|
||||
"hash": payload["hash"],
|
||||
"timestamp": "2026-08-15T00:00:00Z",
|
||||
"blockHash": "0xdead",
|
||||
},
|
||||
)
|
||||
if url.endswith("/api/verify"):
|
||||
if json.get("certificate") == "job-1":
|
||||
if payload.get("certificate") == "job-1":
|
||||
return _Resp(200, {"valid": True, "hash": SHA256_EMPTY})
|
||||
return _Resp(200, {"valid": False})
|
||||
return _Resp(404, {"error": "nope"})
|
||||
|
|
|
|||
Loading…
Reference in a new issue