DISCLAIMER: the examples presented here might not necessarily be “the right way” to do X in Django. Get in touch to propose changes or addictions.
TABLE OF CONTENTS
- Prelude: How do I know what to test?
- Test organization
- Testing a many to many relationship
- Testing model str
- Testing model fields en masse
- Testing a POST request
- Testing an inline formset
- More robust URLs in tests
- Providing data dictionary from a Django model
- Testing authentication
- Testing request headers
- Django REST framework interlude
- DRF: Testing POST requests
- DRF: Testing authentication
- Other resources
To follow along make sure to create a new Django project.
#django #cheat sheet #django project