Mercurial > kallithea
view rhodecode/tests/functional/test_journal.py @ 3797:d7488551578e beta
synced vcs with upstream
- moved subprocessio module to VCS
- many small changes to make embedded vcs as similar to to external lib
- use only absolute imports
- patch vcs config during load pylons env
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 27 Apr 2013 11:24:25 +0200 |
parents | 4910b2607a29 |
children | 7e5f8c12a3fc |
line wrap: on
line source
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')) response.mustcontain("""<div class="journal_day">%s</div>""" % datetime.date.today()) def test_stop_following_repository(self): session = self.log_user() # usr = Session().query(User).filter(User.username == 'test_admin').one() # repo = Session().query(Repository).filter(Repository.repo_name == HG_REPO).one() # # followings = Session().query(UserFollowing)\ # .filter(UserFollowing.user == usr)\ # .filter(UserFollowing.follows_repository == repo).all() # # assert len(followings) == 1, 'Not following any repository' # # response = self.app.post(url(controller='journal', # action='toggle_following'), # {'auth_token':get_token(session), # 'follows_repo_id':repo.repo_id}) def test_start_following_repository(self): self.log_user() response = self.app.get(url(controller='journal', action='index'),) def test_public_journal_atom(self): self.log_user() response = self.app.get(url(controller='journal', action='public_journal_atom'),) def test_public_journal_rss(self): self.log_user() response = self.app.get(url(controller='journal', action='public_journal_rss'),)