def test_get_serial_number_overflows(self): driver = UnipiDALIDriver() driver._next_sn = 255 self.assertEqual(driver._get_sn(), 1)
def test_get_serial_number(self): driver = UnipiDALIDriver() driver._next_sn = 1 self.assertEqual(driver._get_sn(), 2)
def test_get_serial_number_random(self): driver = UnipiDALIDriver() driver._next_sn = 5 self.assertEqual(driver._get_sn(), 6)
def test_get_serial_number_init(self): driver = UnipiDALIDriver() self.assertEqual(driver._get_sn(), 1)