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')
def test_default_reading(self): """Ensure NullSensor returns None""" ns = NullSensor('foo', 'bar') self.assertTrue(ns.get_reading() is None)