1👍
✅
Well, you could test:
- If you have the right number of pages for the objects you’re paginating.
- If the page you’re viewing contains the right object range. If trying to access a page that doesn’t exist returns the
appropriate error. - If your views for listing objects and object detail return the correct HTTP status code (200)
For starters. Hope that helps you out.
3👍
First read the Django testing documentation. You might also want to read this book. It’s dated in some areas, but testing is still pretty much the same now as it was in 1.1.
It’s a bit much of a topic to cover in an SO answer.
Source:stackexchange.com