Mercurial > kallithea
annotate rhodecode/tests/functional/test_journal.py @ 3159:4910b2607a29 beta
fixes issue #658, my account edit was missing this functionality
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 10 Jan 2013 23:09:17 +0100 |
parents | 25029d6f4b47 |
children | d7488551578e |
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() | |
1749
8ecc6b8229a5
commit less models
Marcin Kuzminski <marcin@python-works.com>
parents:
1713
diff
changeset
|
17 # usr = self.Session.query(User).filter(User.username == 'test_admin').one() |
8ecc6b8229a5
commit less models
Marcin Kuzminski <marcin@python-works.com>
parents:
1713
diff
changeset
|
18 # repo = self.Session.query(Repository).filter(Repository.repo_name == HG_REPO).one() |
875 | 19 # |
1749
8ecc6b8229a5
commit less models
Marcin Kuzminski <marcin@python-works.com>
parents:
1713
diff
changeset
|
20 # followings = self.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'),) |