• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

Revisión3dcc34e0c475dec00bae0cbba40c84f2a1883ba5 (tree)
Tiempo2011-05-01 07:21:40
AutorRick Copeland <rcopeland@geek...>
CommiterRick Copeland

Log Message

[#1831] Fix some tests

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

Cambiar Resumen

Diferencia incremental

--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -441,7 +441,9 @@ class MergeRequest(VersionedArtifact):
441441 @LazyProperty
442442 def downstream_repo_url(self):
443443 with self.push_downstream_context():
444- return c.app.url
444+ return c.app.repo.clone_url(
445+ category='ro',
446+ username=c.user.username)
445447
446448 def push_downstream_context(self):
447449 return h.push_context(self.downstream.project_id, self.downstream.mount_point)
--- a/Allura/allura/templates/widgets/neighborhood_add_project.html
+++ b/Allura/allura/templates/widgets/neighborhood_add_project.html
@@ -10,7 +10,7 @@
1010 <div class="grid-6">&nbsp;</div>
1111 <div class="grid-9" style="text-align: right">
1212 <label for="{{ widget.context_for(widget.fields[1])['id'] }}">
13- URL: http://{{environ['HTTP_HOST']}}{{neighborhood.url()}}
13+ URL: http://{{request.environ['HTTP_HOST']}}{{neighborhood.url()}}
1414 </label>
1515 </div>
1616 <div class="grid-8">{{widget.display_field_by_idx(1)|safe}}<br><div id="name_availablity" style="display:none"></div></div>
--- a/Allura/allura/tests/model/test_repo.py
+++ b/Allura/allura/tests/model/test_repo.py
@@ -204,7 +204,7 @@ class TestMergeRequest(_TestWithRepoAndCommit):
204204 assert mr.creator_name == u.get_pref('display_name')
205205 assert mr.creator_url == u.url()
206206 assert mr.downstream_url == '/p/test/test2/'
207- assert mr.downstream_repo_url == 'http://svn.localhost/p/test/test2/trunk'
207+ assert mr.downstream_repo_url == 'http://svn.localhost/p/test/test2/trunk', mr.downstream_repo_url
208208 assert mr.commits == [ self._make_commit('foo')[0] ]
209209
210210 class TestLastCommitFor(_TestWithRepoAndCommit):
--- a/Allura/tg/decorators.py
+++ b/Allura/tg/decorators.py
@@ -76,15 +76,16 @@ class Decoration(object):
7676 self._before_validate.append(func)
7777
7878 def do_validate_params(self, params):
79- # An object used by FormEncode to get translator function
8079 for hook in self._before_validate:
8180 hook(params)
8281 if self._validators:
8382 state = type('state', (), {})
84- if hasattr(self._validators, 'to_python'):
83+ if isinstance(self._validators, schema.Schema):
8584 params = self._validators.to_python(params, state)
86- if hasattr(self._validators, 'validate'):
85+ elif hasattr(self._validators, 'validate'):
8786 params = self._validators.validate(params, state)
87+ else:
88+ assert False, 'Invalid validator: %s' % self._validators
8889 return params
8990
9091 def do_render_response(self, result):