def test_build_object_unset(self): test_obj = DeviceObject() test_obj._build_object() self.assertIsNone(None, test_obj.m_device.id) self.assertIsNone(None, test_obj.m_device.name) self.assertIsNone(None, test_obj.m_device.interface) self.assertIsNone(None, test_obj.m_device.implementation)
def test_build_object_keys(self): m_atribs = { "id": 2, "name": "value2", "interface": DeviceInterfaces.SERIAL, "implementation": "ArduinoGeigerPCB", } test_obj = DeviceObject(**m_atribs) test_obj._build_object() self.assertEqual(2, test_obj.m_device.id) self.assertEqual("value2", test_obj.m_device.name) self.assertEqual(DeviceInterfaces.SERIAL, test_obj.m_device.interface)