mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
[PY3] python3ize schema test
thirsty is specified as a boolean need to copy the top level of kwargs so that the dictionary does not changes size during the loop.
This commit is contained in:
parent
a20d543305
commit
445c7a2c20
@ -515,7 +515,7 @@ class BaseSchemaItemMeta(six.with_metaclass(Prepareable, type)):
|
||||
'Please pass all arguments as named arguments. Un-named '
|
||||
'arguments are not supported'
|
||||
)
|
||||
for key in kwargs.keys():
|
||||
for key in kwargs.copy().keys():
|
||||
# Store the kwarg keys as the instance attributes for the
|
||||
# serialization step
|
||||
if key == 'name':
|
||||
|
@ -2215,7 +2215,7 @@ class ComplexSchemaTestCase(TestCase):
|
||||
as excinfo:
|
||||
|
||||
jsonschema.validate(
|
||||
{'complex_complex_item': {'complex_item': {'thirsty': 'Bar'}}},
|
||||
{'complex_complex_item': {'complex_item': {'thirsty': True}}},
|
||||
serialized)
|
||||
self.assertIn('\'hungry\' is a required property',
|
||||
excinfo.exception.message)
|
||||
|
Loading…
Reference in New Issue
Block a user