Commits

Marcin Kuzminski committed 74672d4

fixed validator tests

Comments (0)

Files changed (1)

rhodecode/tests/test_validators.py

 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
 
         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