# HG changeset patch # User Marcin Kuzminski # Date 1316649968 -10800 # Node ID 605707b50d7c54198c06555e40e7194743a4b921 # Parent daa29da0f783255c4dcf9c2ef18ae5893b2b3069 test fixes for vcs update diff -r daa29da0f783 -r 605707b50d7c rhodecode/tests/functional/test_admin_ldap_settings.py --- a/rhodecode/tests/functional/test_admin_ldap_settings.py Thu Sep 22 02:46:36 2011 +0300 +++ b/rhodecode/tests/functional/test_admin_ldap_settings.py Thu Sep 22 03:06:08 2011 +0300 @@ -1,10 +1,13 @@ from rhodecode.tests import * from rhodecode.model.db import RhodeCodeSettings +from nose.plugins.skip import SkipTest +skip_ldap_test = False try: import ldap except ImportError: # means that python-ldap is not installed + skip_ldap_test = True pass class TestLdapSettingsController(TestController): @@ -17,6 +20,9 @@ def test_ldap_save_settings(self): self.log_user() + if skip_ldap_test: + raise SkipTest('skipping due to missing ldap lib') + test_url = url(controller='admin/ldap_settings', action='ldap_settings') @@ -44,6 +50,9 @@ def test_ldap_error_form(self): self.log_user() + if skip_ldap_test: + raise SkipTest('skipping due to missing ldap lib') + test_url = url(controller='admin/ldap_settings', action='ldap_settings') @@ -61,10 +70,13 @@ 'ldap_attr_firstname':'', 'ldap_attr_lastname':'', 'ldap_attr_email':'' }) - + self.assertTrue("""The LDAP Login""" """ attribute of the CN must be specified""" in response.body) + + + self.assertTrue("""Please """ """enter a number""" in response.body) diff -r daa29da0f783 -r 605707b50d7c rhodecode/tests/functional/test_home.py --- a/rhodecode/tests/functional/test_home.py Thu Sep 22 02:46:36 2011 +0300 +++ b/rhodecode/tests/functional/test_home.py Thu Sep 22 03:06:08 2011 +0300 @@ -6,10 +6,17 @@ self.log_user() response = self.app.get(url(controller='home', action='index')) #if global permission is set - assert 'ADD NEW REPOSITORY' in response.body, 'No Button for add new repository' - assert 'href="/%s/summary"' % HG_REPO in response.body, ' mising repository in list' + self.assertTrue('ADD NEW REPOSITORY' in response.body) + self.assertTrue('href="/%s/summary"' % HG_REPO in response.body) # Test response... - assert """Mercurial repository""" in response.body, 'wrong info about type of repositry' - assert """public repository""" in response.body, 'wrong info about repository availabilty' - assert """r173:27cd5cce30c9""" in response.body, 'no info about tooltip' + self.assertTrue("""""" in response.body) + self.assertTrue("""""" in response.body) + + self.assertTrue("""r173:27cd5cce30c9""" + in response.body) diff -r daa29da0f783 -r 605707b50d7c rhodecode/tests/functional/test_login.py --- a/rhodecode/tests/functional/test_login.py Thu Sep 22 02:46:36 2011 +0300 +++ b/rhodecode/tests/functional/test_login.py Thu Sep 22 03:06:08 2011 +0300 @@ -173,7 +173,7 @@ 'lastname':'test'}) self.assertEqual(response.status , '200 OK') - assert 'Password do not match' in response.body + assert 'Passwords do not match' in response.body def test_register_ok(self): username = 'test_regular4'