How to unit test django middleware?
- by luc
I've implemented a django middleware for getting pages from the database (something similar to the flatpage subframework)
Unfortunately it seems that it is not possible to test it with the django testing framework.
Any suggestion?
Thanks in advance
Update: maybe a mistake in my test but I can't get an object that should be returned by a middleware. I'll inverstigate more.
Does anybody have unit-tested a middleware code?