Пример #1
0
 def test_get_serial_number_overflows(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 255
     self.assertEqual(driver._get_sn(), 1)
Пример #2
0
 def test_get_serial_number(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 1
     self.assertEqual(driver._get_sn(), 2)
Пример #3
0
 def test_get_serial_number_random(self):
     driver = UnipiDALIDriver()
     driver._next_sn = 5
     self.assertEqual(driver._get_sn(), 6)
Пример #4
0
 def test_get_serial_number_init(self):
     driver = UnipiDALIDriver()
     self.assertEqual(driver._get_sn(), 1)