[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:
Daniel Wallace 2016-08-02 10:16:28 -05:00
parent a20d543305
commit 445c7a2c20
2 changed files with 2 additions and 2 deletions

View File

@ -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':

View File

@ -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)