Sort lists in test

This commit is contained in:
Lucidiot 2019-04-06 21:38:11 +02:00
parent 71ed538a9e
commit e987bab44c
No known key found for this signature in database
GPG Key ID: AE3F7205692FA205

View File

@ -154,8 +154,8 @@ class TestOperationIntrospection(TestCase):
responses = inspector._get_responses(path, method) responses = inspector._get_responses(path, method)
schema = responses['200']['content']['application/json']['schema'] schema = responses['200']['content']['application/json']['schema']
assert schema['required'] == ['text', 'nested'] assert sorted(schema['required']) == ['nested', 'text']
assert list(schema['properties'].keys()) == ['text', 'nested'] assert sorted(list(schema['properties'].keys())) == ['nested', 'text']
assert schema['properties']['nested']['type'] == 'object' assert schema['properties']['nested']['type'] == 'object'
assert list(schema['properties']['nested']['properties'].keys()) == ['number'] assert list(schema['properties']['nested']['properties'].keys()) == ['number']
assert schema['properties']['nested']['required'] == ['number'] assert schema['properties']['nested']['required'] == ['number']