Mercurial > kallithea
annotate 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 |
rev | line source |
---|---|
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
1 from rhodecode.tests import * |
875 | 2 from rhodecode.model.db import UserFollowing, User, Repository |
3 from rhodecode.lib.helpers import get_token | |
1021 | 4 import datetime |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
5 |
3075
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
6 |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
7 class TestJournalController(TestController): |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
8 |
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 def test_index(self): |
875 | 10 self.log_user() |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 response = self.app.get(url(controller='journal', action='index')) |
1021 | 12 |
3159
4910b2607a29
fixes issue #658, my account edit was missing this functionality
Marcin Kuzminski <marcin@python-works.com>
parents:
3075
diff
changeset
|
13 response.mustcontain("""<div class="journal_day">%s</div>""" % datetime.date.today()) |
875 | 14 |
15 def test_stop_following_repository(self): | |
16 session = self.log_user() | |
3797
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3159
diff
changeset
|
17 # usr = Session().query(User).filter(User.username == 'test_admin').one() |
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3159
diff
changeset
|
18 # repo = Session().query(Repository).filter(Repository.repo_name == HG_REPO).one() |
875 | 19 # |
3797
d7488551578e
synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents:
3159
diff
changeset
|
20 # followings = Session().query(UserFollowing)\ |
875 | 21 # .filter(UserFollowing.user == usr)\ |
22 # .filter(UserFollowing.follows_repository == repo).all() | |
23 # | |
24 # assert len(followings) == 1, 'Not following any repository' | |
25 # | |
26 # response = self.app.post(url(controller='journal', | |
27 # action='toggle_following'), | |
28 # {'auth_token':get_token(session), | |
29 # 'follows_repo_id':repo.repo_id}) | |
30 | |
31 def test_start_following_repository(self): | |
32 self.log_user() | |
33 response = self.app.get(url(controller='journal', action='index'),) | |
34 | |
3075
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
35 def test_public_journal_atom(self): |
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
36 self.log_user() |
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
37 response = self.app.get(url(controller='journal', action='public_journal_atom'),) |
875 | 38 |
3075
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
39 def test_public_journal_rss(self): |
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
40 self.log_user() |
25029d6f4b47
fixed issue with public journal rss/atom feeds after journal filter implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
1749
diff
changeset
|
41 response = self.app.get(url(controller='journal', action='public_journal_rss'),) |