vitalik / django-ninja

💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
https://django-ninja.dev
MIT License
7.28k stars 432 forks source link

DRF-style data property for responses in tests #1260

Closed c4ffein closed 3 months ago

c4ffein commented 3 months ago

DRF lets you access a data attribute containing the deserialized data from the responses in tests. Having the same kind of attribute (which, here, is computed and cached on the fly) would not only make writing tests slightly more comfortable, but would also make porting tests from DRF to Ninja a lot easier. Related to #664