Improve test for sachsen module
This commit is contained in:
parent
223ee55824
commit
7b8bd6c661
1 changed files with 6 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
|
|
||||||
from weboob.tools.test import BackendTest
|
from weboob.tools.test import BackendTest
|
||||||
|
from weboob.capabilities.base import find_object
|
||||||
|
|
||||||
|
|
||||||
class SachsenTest(BackendTest):
|
class SachsenTest(BackendTest):
|
||||||
|
|
@ -28,10 +29,14 @@ class SachsenTest(BackendTest):
|
||||||
l = list(self.backend.iter_gauges())
|
l = list(self.backend.iter_gauges())
|
||||||
self.assertTrue(len(l) > 0)
|
self.assertTrue(len(l) > 0)
|
||||||
|
|
||||||
gauge = l[0]
|
gauge = find_object(l, id=u'501060')
|
||||||
|
|
||||||
sensors = list(self.backend.iter_sensors(gauge))
|
sensors = list(self.backend.iter_sensors(gauge))
|
||||||
self.assertTrue(len(sensors) > 0)
|
self.assertTrue(len(sensors) > 0)
|
||||||
|
|
||||||
|
for sensor in sensors:
|
||||||
|
self.assertTrue(sensor.lastvalue.level > 0)
|
||||||
|
|
||||||
sensor = sensors[0]
|
sensor = sensors[0]
|
||||||
|
|
||||||
history = list(self.backend.iter_gauge_history(sensor))
|
history = list(self.backend.iter_gauge_history(sensor))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue