bug #
1101098
Change-Id: I9430ad859e9a93d6c0d2a417877e02c151e98a05
return (self.error_prefix +
'%s Property not implemented yet' % key)
+ for key in self.data:
+ if key not in self.props:
+ return (self.error_prefix +
+ 'Unknown Property "%s"' % key)
+
def __getitem__(self, key):
if key not in self:
raise KeyError(self.error_prefix + 'Invalid Property %s' % key)
schema = {'foo': {'Type': 'String'}}
props = properties.Properties(schema, {'foo': 42})
self.assertEqual(props.validate(), 'foo Value must be a string')
+
+ def test_unknown_typo(self):
+ schema = {'foo': {'Type': 'String'}}
+ props = properties.Properties(schema, {'food': 42})
+ self.assertNotEqual(props.validate(), None)