Update fixtures (see prev commit)
This commit is contained in:
parent
404e1644db
commit
ef41123264
1 changed files with 14 additions and 15 deletions
19
fixtures.py
19
fixtures.py
|
@ -1,19 +1,18 @@
|
||||||
import time
|
import time
|
||||||
|
from models import Device, GeoPosition, SensorData
|
||||||
from models import SensorData
|
|
||||||
|
|
||||||
|
|
||||||
cur_time = int(time.time())
|
cur_time = int(time.time())
|
||||||
device_mac = '9B-89-A9-ED-F2-FB'
|
device = Device(
|
||||||
device_name = 'My RaspberryPi 4B'
|
'9B-89-A9-ED-F2-FB',
|
||||||
sensors = [
|
'My RaspberryPi 4B',
|
||||||
SensorData('owner', 'darkcat09'),
|
'darkcat09',
|
||||||
SensorData('lat', 56), # just random data
|
GeoPosition(56, 49, 400), # just random data
|
||||||
SensorData('lon', 49),
|
[
|
||||||
SensorData('alt', 400),
|
|
||||||
SensorData('t1', 12.42, cur_time), # let it be temp outdoors
|
SensorData('t1', 12.42, cur_time), # let it be temp outdoors
|
||||||
SensorData('t2', 22.50, cur_time, 'Temp in living room'),
|
SensorData('t2', 22.50, cur_time, 'Temp in living room'),
|
||||||
SensorData('t3', 60.11, None, 'Poor Raspberry CPU...'),
|
SensorData('t3', 60.11, None, 'Poor Raspberry CPU...'),
|
||||||
SensorData('p1', 752.33, None, 'Barometer'),
|
SensorData('p1', 752.33, None, 'Barometer'),
|
||||||
SensorData('p2', 751.42),
|
SensorData('p2', 751.42),
|
||||||
]
|
],
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue