# HG changeset patch # User Marcin Kuzminski # Date 2011-02-10 23:12:27 # Node ID 0ea8eca2d63e48db77f4873b369d5dfbafa09f17 # Parent 26114d182efe3506fdfd2ac910d66bb335211827 fixed tests diff --git a/rhodecode/tests/functional/test_changelog.py b/rhodecode/tests/functional/test_changelog.py --- a/rhodecode/tests/functional/test_changelog.py +++ b/rhodecode/tests/functional/test_changelog.py @@ -7,11 +7,13 @@ class TestChangelogController(TestContro response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO)) assert """
""" in response.body, 'wrong info about number of changes' - assert """
commit 154: 5e204e7583b9@2010-08-10 01:18:46
""" in response.body , 'no info on this commit' + assert """""" in response.body, 'no checkbox for this commit' + assert """commit 154: 5e204e7583b9@2010-08-10 01:18:46""" in response.body , 'no info on this commit' assert """Small update at simplevcs app""" in response.body, 'missing info about commit message' - assert """0""" in response.body, 'wrong info about removed nodes' - assert """2""" in response.body, 'wrong info about changed nodes' - assert """1""" in response.body, 'wrong info about added nodes' + + assert """0""" in response.body, 'wrong info about removed nodes' + assert """2""" in response.body, 'wrong info about changed nodes' + assert """1""" in response.body, 'wrong info about added nodes' #pagination @@ -22,11 +24,14 @@ class TestChangelogController(TestContro response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':5}) response = self.app.get(url(controller='changelog', action='index', repo_name=HG_REPO), {'page':6}) + # Test response after pagination... - assert """
commit 64: 46ad32a4f974@2010-04-20 00:33:21
"""in response.body, 'wrong info about commit 64' - assert """1"""in response.body, 'wrong info about number of removed' - assert """13"""in response.body, 'wrong info about number of changes' - assert """20"""in response.body, 'wrong info about number of added' + print response.body + assert """""" in response.body, 'no checkbox for this commit' + assert """commit 64: 46ad32a4f974@2010-04-20 00:33:21"""in response.body, 'wrong info about commit 64' + assert """1"""in response.body, 'wrong info about number of removed' + assert """13"""in response.body, 'wrong info about number of changes' + assert """20"""in response.body, 'wrong info about number of added' assert """""" % HG_REPO in response.body, 'wrong info about commit 64 is a merge' diff --git a/rhodecode/tests/functional/test_journal.py b/rhodecode/tests/functional/test_journal.py --- a/rhodecode/tests/functional/test_journal.py +++ b/rhodecode/tests/functional/test_journal.py @@ -1,23 +1,18 @@ from rhodecode.tests import * from rhodecode.model.db import UserFollowing, User, Repository from rhodecode.lib.helpers import get_token +import datetime class TestJournalController(TestController): def test_index(self): self.log_user() response = self.app.get(url(controller='journal', action='index')) + # Test response... - assert """
- - - public repository - - vcs_test_hg - -
""" in response.body, 'following repo list' + assert """ %s
""" % datetime.date.today() in response.body, 'no info about action journal day' def test_stop_following_repository(self): session = self.log_user() diff --git a/rhodecode/tests/functional/test_login.py b/rhodecode/tests/functional/test_login.py --- a/rhodecode/tests/functional/test_login.py +++ b/rhodecode/tests/functional/test_login.py @@ -127,7 +127,10 @@ class TestLoginController(TestController print response.body assert response.status == '200 OK', 'Wrong response from register page got %s' % response.status assert 'An email address must contain a single @' in response.body - assert 'Username may only contain alphanumeric characters underscores or dashes and must begin with alphanumeric character' in response.body + assert ('Username may only contain ' + 'alphanumeric characters underscores, ' + 'periods or dashes and must begin with ' + 'alphanumeric character') in response.body def test_register_err_case_sensitive(self): response = self.app.post(url(controller='login', action='register'),