Skip to content

Commit

Permalink
Merge pull request #229 from macisamuele/maci-fix-tests-due-to-bravad…
Browse files Browse the repository at this point in the history
…o-core-update

Fix tests due to bravado core update
  • Loading branch information
macisamuele committed May 22, 2018
2 parents 9ae382b + 4222a8b commit 2b91cb0
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 69 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ dist/
pyramid_swagger.egg-info
tests/__pycache__
venv/
.pytest_cache/
14 changes: 0 additions & 14 deletions tests/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,3 @@ def test_extenal_refs_no_empty_keys():
spec = Spec.from_dict(spec_dict, path)
flattened_spec = spec.flattened_spec
traverse_spec(flattened_spec)


def test_extenal_conflicting_namespaces():
"""
This test ensures that we dont overwrite
keys in defs_dict if multiple files have
an object with the same name.
"""
with open('tests/sample_schemas/conflicting_namespaces/swagger.json') as swagger_spec:
spec_dict = yaml.load(swagger_spec)
path = 'file:' + os.getcwd() + '/tests/sample_schemas/conflicting_namespaces/swagger.json'
spec = Spec.from_dict(spec_dict, path)
flattened_spec = spec.flattened_spec
assert len(flattened_spec['definitions']) == 4
10 changes: 0 additions & 10 deletions tests/sample_schemas/conflicting_namespaces/bar.json

This file was deleted.

10 changes: 0 additions & 10 deletions tests/sample_schemas/conflicting_namespaces/foo.json

This file was deleted.

33 changes: 0 additions & 33 deletions tests/sample_schemas/conflicting_namespaces/swagger.json

This file was deleted.

3 changes: 2 additions & 1 deletion tests/sample_schemas/recursive_app/external/external.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"$ref":"#/widget"
}
}
}
},
"type": "object"
}
}
3 changes: 2 additions & 1 deletion tests/sample_schemas/recursive_app/internal/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"$ref":"#/definitions/widget"
}
}
}
},
"type": "object"
}
},
"paths": {
Expand Down

0 comments on commit 2b91cb0

Please sign in to comment.