• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

allura


Commit MetaInfo

修訂7a6154fd94514370e06b44df95a7d8ff7983f10c (tree)
時間2011-04-30 02:08:35
作者Rick Copeland <rcopeland@geek...>
CommiterRick Copeland

Log Message

[#1831] Tests now passing

Signed-off-by: Rick Copeland <rcopeland@geek.net>

Change Summary

差異

--- a/Allura/allura/controllers/attachments.py
+++ b/Allura/allura/controllers/attachments.py
@@ -16,9 +16,7 @@ class AttachmentsController(BaseController):
1616 @expose()
1717 def _lookup(self, filename=None, *args):
1818 if filename:
19- if not args:
20- filename = request.path.rsplit('/', 1)[-1]
21- filename=unquote(filename)
19+ filename = unicode(filename, 'utf-8')
2220 return self.AttachmentControllerClass(filename, self.artifact), args
2321 else:
2422 raise exc.HTTPNotFound
--- a/Allura/tg/decorators.py
+++ b/Allura/tg/decorators.py
@@ -23,6 +23,7 @@ def override_template(func, template):
2323 def without_trailing_slash(func):
2424 from tg import redirect
2525 def _check_path(params):
26+ if request.method != 'GET': return
2627 if request.path.endswith('/'):
2728 redirect(request.url.replace(request.path, request.path[:-1], 1))
2829 before_validate(_check_path)(func)
@@ -31,6 +32,7 @@ def without_trailing_slash(func):
3132 def with_trailing_slash(func):
3233 from tg import redirect
3334 def _check_path(params):
35+ if request.method != 'GET': return
3436 if not request.path.endswith('/'):
3537 redirect(request.url.replace(request.path, request.path + '/', 1))
3638 before_validate(_check_path)(func)
--- a/ForgeSVN/forgesvn/svn_main.py
+++ b/ForgeSVN/forgesvn/svn_main.py
@@ -31,6 +31,8 @@ class ForgeSVNApp(RepositoryApp):
3131 default_root = RepoRootController()
3232 self.root.refresh = default_root.refresh
3333 self.root.feed = default_root.feed
34+ setattr(self.root, 'feed.rss', self.root.feed)
35+ setattr(self.root, 'feed.atom', self.root.feed)
3436 self.root.commit_browser = default_root.commit_browser
3537
3638 @LazyProperty
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -536,7 +536,8 @@ class TestFunctionalController(TestController):
536536 'summary': 'This is not too long.',
537537 'terms': 'aaa',
538538 'old_summary': '',
539- 'sort': ''}).follow()
539+ 'sort': ''})
540+ r = r.follow()
540541 r = self.app.get('/bugs/')
541542 assert sidebar_contains(r, 'This is not too long.')
542543 r = self.app.post('/admin/bugs/bins/save_bin',{
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -658,7 +658,7 @@ class BinController(BaseController):
658658 c.bin_form = W.bin_form
659659 return dict(q=q or '', bin=bin or '', modelname='Bin', page='New Bin', globals=self.app.globals)
660660
661- @with_trailing_slash
661+ @without_trailing_slash
662662 @h.vardec
663663 @expose()
664664 @require_post()
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -43,8 +43,8 @@ class TestRootController(TestController):
4343
4444 def test_root_new_search(self):
4545 self.app.get('/wiki/TEST/')
46- response = self.app.get('/wiki/search?q=TEST')
47- assert 'Search wiki: TEST' in response
46+ response = self.app.get('/wiki/search/?q=TEST')
47+ assert 'Search wiki: TEST' in response, response.showbrowser()
4848
4949 def test_page_index(self):
5050 response = self.app.get('/wiki/TEST/')
--- a/ForgeWiki/forgewiki/tests/test_wiki_roles.py
+++ b/ForgeWiki/forgewiki/tests/test_wiki_roles.py
@@ -1,4 +1,4 @@
1-from pylons import c, g
1+from tg import c, g
22
33 from alluratest.controller import setup_basic_test, setup_global_objects
44 from allura import model as M