Add timestamp tracking to dummy relay and update tests

This commit is contained in:
thePR0M3TH3AN
2025-07-14 08:55:55 -04:00
parent 2a329a40bb
commit e45483c6eb
5 changed files with 14 additions and 6 deletions

View File

@@ -49,6 +49,10 @@ def test_publish_and_fetch_deltas(dummy_nostr_client):
d1 = b"d1"
d2 = b"d2"
asyncio.run(client.publish_delta(d1, manifest_id))
first_ts = relay.deltas[-1].created_at
asyncio.run(client.publish_delta(d2, manifest_id))
second_ts = relay.deltas[-1].created_at
assert second_ts > first_ts
assert relay.manifests[-1].delta_since == second_ts
deltas = asyncio.run(client.fetch_deltas_since(0))
assert deltas == [d1, d2]