Smoke test your Django admin site

7 points by pushcx


simonw

I like this. Tests that just check if a 200 status code is returned are still really valuable because they slot 500 errors, and looping through all Django admin views is a neat low effort way to apply them.

I’ve not written many tests against the Django admin in my own projects, here’s a short note from when I did that a few years ago: https://til.simonwillison.net/django/testing-django-admin-with-pytest

paddy

I love the django admin, it’s a fantastic DSL for most common practices in CRUD apps.

I tend to find it tough to write tests for DSLs because you are essentially saying “does my DSL code look like my business rules” but now you have expressed your business rules twice. You still need to test the app with a subject matter expert.

Testing the DSL runtime itself is very important. Testing additions made to the DSL are also super important. So hopefully you can pull your code out into testable functions - this gets tricky with the django admin, but can be done.

koala

Maybe this could be implemented as a system check?