def test_from_json_with_nonstring_value(self):
     field = DeviceField.from_json({'name': 'test_name', 'type': 'boolean', 'value': True})
     self.assertConstructionIsCorrect(field, 'test_name', 'boolean', True)
 def test_from_json_with_invalid_type(self):
     field = DeviceField.from_json({'name': 'test_name', 'type': 'invalid', 'value': 'true'})
     self.assertConstructionIsCorrect(field, 'test_name', 'string', 'true')
 def test_from_json_basic(self):
     field = DeviceField.from_json({'name': 'test_name', 'type': 'string', 'value': 'abcd'})
     self.assertConstructionIsCorrect(field, 'test_name', 'string', 'abcd')