melisa/tests/test_snowflakes.py

12 lines
286 B
Python
Raw Normal View History

2022-03-18 14:57:47 +03:00
from melisa.utils import Snowflake
class TestSnowflakes:
def test_assertions(self):
assert Snowflake(2) == 2
assert Snowflake("2") == 2
def test_timestamps(self):
sflake = Snowflake(175928847299117063)
2023-03-07 18:37:18 +03:00
assert sflake.timestamp == 1462015105796