annotate rhodecode/tests/functional/test_forks.py @ 1718:f78bee8eec78 beta

reduce cookie size for better support of client side sessions
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 25 Nov 2011 19:25:10 +0200
parents f9559677c953
children 64e91067b996
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1375
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 from rhodecode.tests import *
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 from rhodecode.model.db import Repository
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 class TestForksController(TestController):
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 def test_index(self):
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 self.log_user()
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 repo_name = HG_REPO
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 response = self.app.get(url(controller='forks', action='forks',
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 repo_name=repo_name))
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 self.assertTrue("""There are no forks yet""" in response.body)
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 def test_index_with_fork(self):
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 self.log_user()
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 # create a fork
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 fork_name = HG_FORK
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 description = 'fork of vcs test'
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 repo_name = HG_REPO
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 response = self.app.post(url(controller='settings',
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 action='fork_create',
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 repo_name=repo_name),
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 {'fork_name':fork_name,
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 'repo_type':'hg',
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 'description':description,
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 'private':'False'})
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 response = self.app.get(url(controller='forks', action='forks',
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 repo_name=repo_name))
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 self.assertTrue("""<a href="/%s/summary">"""
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 """vcs_test_hg_fork</a>""" % fork_name
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 in response.body)
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
38
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 #remove this fork
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 response = self.app.delete(url('repo', repo_name=fork_name))
f9559677c953 added tests for forks and followers pages
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41