How to unit test django middleware?
Posted
by luc
on Stack Overflow
See other posts from Stack Overflow
or by luc
Published on 2010-03-11T21:57:40Z
Indexed on
2010/03/12
7:27 UTC
Read the original article
Hit count: 449
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?
© Stack Overflow or respective owner