##// END OF EJS Templates
Added views for new ajax functions, got somehow lost in previos commit
Added views for new ajax functions, got somehow lost in previos commit

File last commit:

r1749:8ecc6b82 beta
r2625:fc19979a beta
Show More
test_journal.py
42 lines | 1.6 KiB | text/x-python | PythonLexer
implemented user dashboards, and following system.
r734 from rhodecode.tests import *
tests update
r875 from rhodecode.model.db import UserFollowing, User, Repository
from rhodecode.lib.helpers import get_token
fixed tests
r1021 import datetime
implemented user dashboards, and following system.
r734
class TestJournalController(TestController):
def test_index(self):
tests update
r875 self.log_user()
implemented user dashboards, and following system.
r734 response = self.app.get(url(controller='journal', action='index'))
fixed tests
r1021
implemented user dashboards, and following system.
r734 # Test response...
fixed tests
r1021 assert """ <span id="follow_toggle_1" class="following" title="Stop following this repository""" in response.body, 'no info about stop follwoing repo id 1'
tests update
r875
fixed tests
r1021 assert """<div class="journal_day">%s</div>""" % datetime.date.today() in response.body, 'no info about action journal day'
tests update
r875
def test_stop_following_repository(self):
session = self.log_user()
commit less models...
r1749 # usr = self.Session.query(User).filter(User.username == 'test_admin').one()
# repo = self.Session.query(Repository).filter(Repository.repo_name == HG_REPO).one()
tests update
r875 #
commit less models...
r1749 # followings = self.Session.query(UserFollowing)\
tests update
r875 # .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 __add_repo(self):
pass
def __remove_repo(self):
pass