-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Simplify and improve
get_messages
; use mocked responses (#81
) * Problem: Client tests were not fully offline Solution: Mock responses; refactor to reduce duplication * Problem: Client had no simple of finding out whether a message had been forgotten Solution: get_messages now calls .../messages/{item_hash} endpoint and raises ForgottenMessageException
- Loading branch information
1 parent
5e47d96
commit 59e22b5
Showing
7 changed files
with
190 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"chain": "ETH", | ||
"item_hash": "b917624e649b632232879c657891e02b09b07298f0f67430753d89acf7489ebe", | ||
"sender": "0x4D52380D3191274a04846c89c069E6C3F2Ed94e4", | ||
"type": "aleph-network-metrics", | ||
"channel": "aleph-scoring", | ||
"confirmed": false, | ||
"content": { | ||
"tags": [ | ||
"mainnet" | ||
], | ||
"metrics": { | ||
"ccn": [ | ||
{ | ||
"asn": 24940, | ||
"url": "http://135.181.165.203:4024/", | ||
"as_name": "HETZNER-AS, DE", | ||
"node_id": "599de3dc1857b73d33bf616ab2f449df579e2f1270c9b04dc7bdc630524e1e6c", | ||
"version": "v0.5.1", | ||
"txs_total": 0, | ||
"measured_at": 1700562026.269039, | ||
"base_latency": 0.09740376472473145, | ||
"metrics_latency": 0.3925642967224121, | ||
"pending_messages": 0, | ||
"aggregate_latency": 0.06854844093322754, | ||
"base_latency_ipv4": 0.09740376472473145, | ||
"eth_height_remaining": 0, | ||
"file_download_latency": 0.10360932350158691 | ||
} | ||
], | ||
"server": "151.115.63.76", | ||
"server_asn": 12876, | ||
"server_as_name": "Online SAS, FR" | ||
}, | ||
"version": "1.0" | ||
}, | ||
"item_content": null, | ||
"item_type": "storage", | ||
"signature": "0xc38c0ca2d683b2d0c629a640c156fbbce771c1d58d4c6f266bfa234f68b93302021981a9905d768510fb7fee050b6d5e48096258a2fec2aa531cc7594a4ede3e1b", | ||
"size": 125810, | ||
"time": 1700562222.942672, | ||
"confirmations": [], | ||
"original_item_hash": "b917624e649b632232879c657891e02b09b07298f0f67430753d89acf7489ebe", | ||
"original_signature": "0xc38c0ca2d683b2d0c629a640c156fbbce771c1d58d4c6f266bfa234f68b93302021981a9905d768510fb7fee050b6d5e48096258a2fec2aa531cc7594a4ede3e1b", | ||
"original_type": "aleph-network-metrics", | ||
"hash": "b917624e649b632232879c657891e02b09b07298f0f67430753d89acf7489ebe", | ||
"address": "0x4D52380D3191274a04846c89c069E6C3F2Ed94e4", | ||
"ref": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.