tests/fixtures.py

19 lines
529 B
Python
Raw Permalink Normal View History

2024-05-31 14:58:46 +03:00
import time
2024-05-31 16:41:41 +03:00
from models import Device, GeoPosition, SensorData
2024-05-31 14:58:46 +03:00
cur_time = int(time.time())
2024-05-31 16:41:41 +03:00
device = Device(
'9B-89-A9-ED-F2-FB',
'My RaspberryPi 4B',
'darkcat09',
GeoPosition(56, 49, 400), # just random data
[
SensorData('t1', 12.42, cur_time), # let it be temp outdoors
SensorData('t2', 22.50, cur_time, 'Temp in living room'),
SensorData('t3', 60.11, None, 'Poor Raspberry CPU...'),
SensorData('p1', 752.33, None, 'Barometer'),
SensorData('p2', 751.42),
],
)