# HG changeset patch # User Marcin Kuzminski # Date 2012-10-08 21:00:31 # Node ID 74672d4bdbee631e7463b2f74e52898cd28253d9 # Parent 40362af426b40f403f0bc87a739f9243fdcf2989 fixed validator tests diff --git a/rhodecode/tests/test_validators.py b/rhodecode/tests/test_validators.py --- a/rhodecode/tests/test_validators.py +++ b/rhodecode/tests/test_validators.py @@ -10,7 +10,7 @@ from rhodecode.model.users_group import from rhodecode.model.meta import Session from rhodecode.model.repos_group import ReposGroupModel from rhodecode.config.routing import ADMIN_PREFIX -from rhodecode.model.db import ChangesetStatus +from rhodecode.model.db import ChangesetStatus, Repository from rhodecode.model.changeset_status import ChangesetStatusModel from rhodecode.model.comment import ChangesetCommentsModel @@ -227,7 +227,8 @@ class TestReposGroups(unittest.TestCase) self.assertRaises(formencode.Invalid, validator.to_python, 123) def test_NotReviewedRevisions(self): - validator = v.NotReviewedRevisions() + repo_id = Repository.get_by_repo_name(HG_REPO).repo_id + validator = v.NotReviewedRevisions(repo_id) rev = '0' * 40 # add status for a rev, that should throw an error because it is already # reviewed