コード例 #1
0
 def test_get_serial_non_existing_entry_expect_return_default(self):
     propulsion_entity = SettingsSerialEntity(key=self.propulsion_key)
     propulsion_entity.add_entry(*self.propulsion_serial_port)
     self.assertTrue(
         propulsion_entity.get_entry(SettingsSerialEntity.CHANNEL))
コード例 #2
0
 def test_get_serial_non_existing_port(self):
     propulsion_entity = SettingsSerialEntity(key=self.propulsion_key)
     self.assertFalse(propulsion_entity.get_entry(
         SettingsSerialEntity.PORT))
コード例 #3
0
 def test_get_serial_existing_entry(self):
     propulsion_entity = SettingsSerialEntity(key=self.propulsion_key)
     propulsion_entity.add_entry(*self.propulsion_serial_port)
     self.assertEqual(
         self.propulsion_dict[SettingsSerialEntity.PORT],
         propulsion_entity.get_entry(SettingsSerialEntity.PORT))