2022-08-10 11:17:29 +00:00
|
|
|
from datetime import datetime
|
2022-08-11 10:35:00 +00:00
|
|
|
from time import sleep
|
2022-08-10 11:17:29 +00:00
|
|
|
from unittest.mock import MagicMock
|
|
|
|
|
|
|
|
from lightning_app.utilities.app_logs import _LogEvent
|
|
|
|
|
|
|
|
|
|
|
|
def test_log_event():
|
|
|
|
event_1 = _LogEvent("", datetime.now(), MagicMock(), MagicMock())
|
2022-08-11 10:35:00 +00:00
|
|
|
sleep(0.1)
|
2022-08-10 11:17:29 +00:00
|
|
|
event_2 = _LogEvent("", datetime.now(), MagicMock(), MagicMock())
|
|
|
|
assert event_1 < event_2
|
|
|
|
assert event_1 <= event_2
|