mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-18 14:54:23 +01:00
Fix Event default timestamp (#24)
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
9
test/test_event.py
Normal file
9
test/test_event.py
Normal 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
|
||||
Reference in New Issue
Block a user