snok / drf-openapi-tester

Test utility for validating OpenAPI documentation
https://github.com/snok/django-openapi-tester
BSD 3-Clause "New" or "Revised" License
119 stars 23 forks source link

Fix exception when validation against empty list #265

Closed TheSuperiorStanislav closed 2 years ago

TheSuperiorStanislav commented 2 years ago

When making a request to a list action and getting the empty list, the validator fails because it mistakenly passes an empty dict instead of the original response.

codecov[bot] commented 2 years ago

Codecov Report

Merging #265 (25a064f) into master (758f49b) will not change coverage. The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master     #265   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files           9        9           
  Lines         492      492           
  Branches       97       97           
=======================================
  Hits          492      492           
Impacted Files Coverage Δ
openapi_tester/loaders.py 100.0% <100.0%> (ø)
openapi_tester/schema_tester.py 100.0% <100.0%> (ø)
sondrelg commented 2 years ago

Looks good to me. I'll see if we can update the linters in master; maybe that will fix it.

sondrelg commented 2 years ago

Thanks @TheSuperiorStanislav!