ticket:3 fix tests
Merge branch 't3_middleware'