Fix Event default timestamp (#24)

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
Ryan Armstrong
2023-01-19 11:29:25 -08:00
committed by GitHub
parent 3a903b77ab
commit 87f4207b88
2 changed files with 11 additions and 2 deletions

9
test/test_event.py Normal file
View File

@@ -0,0 +1,9 @@
from nostr.event import Event
from nostr.key import PrivateKey
import time
def test_event_default_time():
time.sleep(1.5)
public_key = PrivateKey().public_key.hex()
event = Event(public_key=public_key, content='test event')
assert (event.created_at - time.time()) < 1