Skip to content

Commit 21e18f3

Browse files
author
Joel Collins
committed
Improved server spec utilities coverage
1 parent 0b732fa commit 21e18f3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test_server_spec_utilities.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,23 @@ def test_recursive_expand_refs_schema_in(spec):
193193

194194

195195
### TODO: Test expand_refs
196+
197+
198+
def test_expand_refs_no_refs(spec):
199+
input_dict = {
200+
"type": "object",
201+
"properties": {
202+
"name": {"type": "string"},
203+
"email": {"type": "string", "format": "email"},
204+
},
205+
}
206+
207+
assert utilities.expand_refs(input_dict, spec) == input_dict
208+
209+
210+
def test_expand_refs_missing_schema(spec):
211+
input_dict = {
212+
"$ref": "MissingRef",
213+
}
214+
215+
assert utilities.expand_refs(input_dict, spec) == input_dict

0 commit comments

Comments
 (0)