Beispiel #1
0
 def test_non_default_reading(self):
     """Ensure NullSensor returns the value given at initialization"""
     ns = NullSensor('foo', 'bar', value='TESTVALUE')
     self.assertEqual(ns.get_reading(), 'TESTVALUE')
Beispiel #2
0
 def test_default_reading(self):
     """Ensure NullSensor returns None"""
     ns = NullSensor('foo', 'bar')
     self.assertTrue(ns.get_reading() is None)