591: Let Testing Middleware check for staticdirect() usage
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Mon, 3 Oct 2011 23:03:43 +0000 (01:03 +0200)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Wed, 19 Oct 2011 19:37:19 +0000 (21:37 +0200)
commit91b89bde4742178534aa2a3fea6308fa463a2550
tree724d7a920cf72c58f3e9a6c243e641f4d3ffc10a
parenteb5bb3fc997da26a39d6d77888574b634f00db57
591: Let Testing Middleware check for staticdirect() usage

All references to static, shipped content should go via
request.staticdirect().

So insert a TestingMiddleware in the chain, which tests for
this on all requests/reponses happening in the test suite.
It's a simple text search for a bogus usage pattern.
mediagoblin/middleware/testing.py [new file with mode: 0644]
mediagoblin/tests/test_mgoblin_app.ini
mediagoblin/tests/test_paste.ini
mediagoblin/tests/tools.py