annotate rhodecode/tests/functional/test_admin_repos.py @ 1205:f4807acf643d beta

added __license__ into main of rhodecode, PEP8ify
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Apr 2011 19:43:31 +0200
parents b1d6478d4561
children 9c0f5d558789
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1037
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
1 import os
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
2 import vcs
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
3
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
4 from rhodecode.model.db import Repository
547
1e757ac98988 renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 459
diff changeset
5 from rhodecode.tests import *
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
6
691
7486da5f0628 Refactor codes for scm model
Marcin Kuzminski <marcin@python-works.com>
parents: 688
diff changeset
7 class TestAdminReposController(TestController):
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
8
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
9 def test_index(self):
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
10 self.log_user()
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
11 response = self.app.get(url('repos'))
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
12 # Test response...
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
13
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
14 def test_index_as_xml(self):
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
15 response = self.app.get(url('formatted_repos', format='xml'))
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
16
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
17 def test_create_hg(self):
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
18 self.log_user()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
19 repo_name = NEW_HG_REPO
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
20 description = 'description for newly created repo'
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
21 private = False
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
22 response = self.app.post(url('repos'), {'repo_name':repo_name,
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
23 'repo_type':'hg',
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
24 'description':description,
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
25 'private':private})
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
26
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
27
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
28 #test if we have a message for that repository
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
29 assert '''created repository %s''' % (repo_name) in response.session['flash'][0], 'No flash message about new repo'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
30
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
31 #test if the fork was created in the database
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
32 new_repo = self.sa.query(Repository).filter(Repository.repo_name == repo_name).one()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
33
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
34 assert new_repo.repo_name == repo_name, 'wrong name of repo name in db'
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
35 assert new_repo.description == description, 'wrong description'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
36
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
37 #test if repository is visible in the list ?
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
38 response = response.follow()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
39
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
40 assert repo_name in response.body, 'missing new repo from the main repos list'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
41
1037
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
42
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
43 #test if repository was created on filesystem
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
44 try:
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
45 vcs.get_repo(os.path.join(TESTS_TMP_PATH, repo_name))
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
46 except:
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
47 assert False , 'no repo in filesystem'
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
48
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
49
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
50 def test_create_git(self):
728
f1629c0c28cc fixed bug in forms found due to testing,
Marcin Kuzminski <marcin@python-works.com>
parents: 691
diff changeset
51 return
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
52 self.log_user()
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
53 repo_name = NEW_GIT_REPO
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
54 description = 'description for newly created repo'
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
55 private = False
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
56 response = self.app.post(url('repos'), {'repo_name':repo_name,
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
57 'repo_type':'git',
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
58 'description':description,
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
59 'private':private})
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
60
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
61
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
62 #test if we have a message for that repository
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
63 assert '''created repository %s''' % (repo_name) in response.session['flash'][0], 'No flash message about new repo'
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
64
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
65 #test if the fork was created in the database
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
66 new_repo = self.sa.query(Repository).filter(Repository.repo_name == repo_name).one()
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
67
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
68 assert new_repo.repo_name == repo_name, 'wrong name of repo name in db'
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
69 assert new_repo.description == description, 'wrong description'
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
70
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
71 #test if repository is visible in the list ?
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
72 response = response.follow()
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
73
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
74 assert repo_name in response.body, 'missing new repo from the main repos list'
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
75
1037
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
76 #test if repository was created on filesystem
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
77 try:
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
78 vcs.get_repo(os.path.join(TESTS_TMP_PATH, repo_name))
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
79 except:
b1d6478d4561 added repo creation filesystem test
Marcin Kuzminski <marcin@python-works.com>
parents: 728
diff changeset
80 assert False , 'no repo in filesystem'
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
81
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
82 def test_new(self):
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
83 self.log_user()
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
84 response = self.app.get(url('new_repo'))
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
85
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
86 def test_new_as_xml(self):
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
87 response = self.app.get(url('formatted_new_repo', format='xml'))
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
88
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
89 def test_update(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
90 response = self.app.put(url('repo', repo_name=HG_REPO))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
91
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
92 def test_update_browser_fakeout(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
93 response = self.app.post(url('repo', repo_name=HG_REPO), params=dict(_method='put'))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
94
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
95 def test_delete(self):
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
96 self.log_user()
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
97 repo_name = 'vcs_test_new_to_delete'
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
98 description = 'description for newly created repo'
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
99 private = False
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
100 response = self.app.post(url('repos'), {'repo_name':repo_name,
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
101 'repo_type':'hg',
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
102 'description':description,
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
103 'private':private})
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
104
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
105
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
106 #test if we have a message for that repository
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
107 assert '''created repository %s''' % (repo_name) in response.session['flash'][0], 'No flash message about new repo'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
108
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
109 #test if the repo was created in the database
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
110 new_repo = self.sa.query(Repository).filter(Repository.repo_name == repo_name).one()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
111
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
112 assert new_repo.repo_name == repo_name, 'wrong name of repo name in db'
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
113 assert new_repo.description == description, 'wrong description'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
114
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
115 #test if repository is visible in the list ?
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
116 response = response.follow()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
117
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
118 assert repo_name in response.body, 'missing new repo from the main repos list'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
119
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
120
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
121 response = self.app.delete(url('repo', repo_name=repo_name))
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
122
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
123 assert '''deleted repository %s''' % (repo_name) in response.session['flash'][0], 'No flash message about delete repo'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
124
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
125 response.follow()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
126
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
127 #check if repo was deleted from db
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
128 deleted_repo = self.sa.query(Repository).filter(Repository.repo_name == repo_name).scalar()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
129
628
dd06bdf974c8 fixed tests,
Marcin Kuzminski <marcin@python-works.com>
parents: 567
diff changeset
130 assert deleted_repo is None, 'Deleted repository was found in db'
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
131
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
132
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
133 def test_delete_browser_fakeout(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
134 response = self.app.post(url('repo', repo_name=HG_REPO), params=dict(_method='delete'))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
135
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
136 def test_show(self):
567
80dc0a23edf7 fixed whoosh failure on new repository
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
137 self.log_user()
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
138 response = self.app.get(url('repo', repo_name=HG_REPO))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
139
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
140 def test_show_as_xml(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
141 response = self.app.get(url('formatted_repo', repo_name=HG_REPO, format='xml'))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
142
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
143 def test_edit(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
144 response = self.app.get(url('edit_repo', repo_name=HG_REPO))
47
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
145
f6ac79182600 Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
diff changeset
146 def test_edit_as_xml(self):
688
8acbfa837180 Tests rewrite for 1.2 added some globals configs to make tests easier.
Marcin Kuzminski <marcin@python-works.com>
parents: 628
diff changeset
147 response = self.app.get(url('formatted_edit_repo', repo_name=HG_REPO, format='xml'))