'Test the digital input.'

def test_state_digital(self):

    self.port.model = 'Input    Digital'
    self.port.value = 0
    self.assertEqual(mfi.STATE_OFF, self.sensor.state)
    self.port.value = 1
    self.assertEqual(mfi.STATE_ON, self.sensor.state)
    self.port.value = 2
    self.assertEqual(mfi.STATE_ON, self.sensor.state)
