I created a couple of intermediate classes and I want to test them against some real representations. Since my application does not include any views or url conf, I was wondering if there is a way to temporarily create views and configure URLs only for testing (similar to the test database) within the Django test database. In the end, I would like to use a test client to check these temporary views for errors that arise from middleware. I did not find a solution for this in the docs.
I know that I can create a test view in my application (in views.py) and point it to ROOT_URLCONF, but I do not want to force the user to do this when using my application and want to test my middleware classes.
Any ideas?
Thanks.
Torsten engelbrecht
source share