Mercurial > kallithea
diff rhodecode/tests/functional/test_admin_settings.py @ 1382:c310e1e1e757 beta
Added CheckSessionFlash into init.
Added repo_groups_test controller.
Renamed users_groups test controller
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 14 Jun 2011 09:38:23 +0200 |
parents | 9c0f5d558789 |
children | 019026a8cf67 |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_admin_settings.py Mon Jun 13 18:04:42 2011 +0200 +++ b/rhodecode/tests/functional/test_admin_settings.py Tue Jun 14 09:38:23 2011 +0200 @@ -61,8 +61,8 @@ rhodecode_ga_code=new_ga_code )) - self.assertTrue('Updated application settings' in - response.session['flash'][0][1]) + self.checkSessionFlash(response, 'Updated application settings') + self.assertEqual(RhodeCodeSettings .get_app_settings()['rhodecode_ga_code'], new_ga_code) @@ -108,9 +108,7 @@ rhodecode_ga_code='' )) - - self.assertTrue('Updated application settings' in - response.session['flash'][0][1]) + self.checkSessionFlash(response, 'Updated application settings') self.assertEqual(RhodeCodeSettings .get_app_settings()['rhodecode_title'], new_title.decode('utf-8')) @@ -168,7 +166,9 @@ email=old_email,)) response.follow() - assert 'Your account was updated successfully' in response.session['flash'][0][1], 'no flash message about success of change' + self.checkSessionFlash(response, + 'Your account was updated successfully') + user = self.sa.query(User).filter(User.username == 'test_admin').one() assert user.email == old_email , 'incorrect user email after update got %s vs %s' % (user.email, old_email)