diff --git a/pylons_app/tests/__init__.py b/pylons_app/tests/__init__.py --- a/pylons_app/tests/__init__.py +++ b/pylons_app/tests/__init__.py @@ -46,6 +46,11 @@ class TestController(TestCase): response = self.app.post(url(controller='login', action='index'), {'username':username, 'password':password}) + print response + + if 'invalid user name' in response.body: + assert False, 'could not login using %s %s' % (username, password) + assert response.status == '302 Found', 'Wrong response code from login got %s' % response.status assert response.session['hg_app_user'].username == username, 'wrong logged in user got %s expected %s' % (response.session['hg_app_user'].username, username) return response.follow()