Mercurial > kallithea
diff pylons_app/tests/__init__.py @ 534:12c976209b2e
fixed test for new version 100% test are ok
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 01 Oct 2010 02:19:34 +0200 |
parents | 53aa1ee1af86 |
children | 72778dda34cf |
line wrap: on
line diff
--- a/pylons_app/tests/__init__.py Fri Oct 01 02:04:32 2010 +0200 +++ b/pylons_app/tests/__init__.py Fri Oct 01 02:19:34 2010 +0200 @@ -46,6 +46,11 @@ 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()