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))
def test_get_serial_non_existing_port(self): propulsion_entity = SettingsSerialEntity(key=self.propulsion_key) self.assertFalse(propulsion_entity.get_entry( SettingsSerialEntity.PORT))
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))