Test: Connect test fails as request.template is a list not an object

Hey,

This code seems to work for me, it has something to do with request.template being a list and not an object. It doesn't seem to be because of template inheritance although I thought it might be at first. This code should work in either case. Sorry about the mess of the last pull request. This one should be pep8 and actually work.

Cheers,

Chris