import time from kallithea.tests import * from kallithea.tests.fixture import Fixture from kallithea.model.meta import Session from kallithea.model.db import User, Repository from kallithea.model.repo import RepoModel from kallithea.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'