import time from rhodecode.tests import * from rhodecode.tests.fixture import Fixture from rhodecode.model.meta import Session from rhodecode.model.db import User, Repository from rhodecode.model.repo import RepoModel from rhodecode.model.repo_group import RepoGroupModel fixture = Fixture() class TestHomeController(TestController): def test_index(self): self.log_user() response = self.app.get(url(controller='home', action='index')) #if global permission is set response.mustcontain('Add Repository') # html in javascript variable: response.mustcontain('var data = {"totalRecords": %s' % len(Repository.getAll())) response.mustcontain(r'href=\"/%s\"' % HG_REPO) response.mustcontain(r'