• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

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

allura


Commit MetaInfo

Révisiond9e6b55f1a5f9e85f067ede7ffc33c7abde0a0d9 (tree)
l'heure2011-06-01 11:34:39
AuteurRick Copeland <rcopeland@geek...>
CommiterRick Copeland

Message de Log

[#2191] Fix test

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

Change Summary

Modification

--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -536,7 +536,7 @@ class ProjectRole(MappedClass):
536536 def user(self):
537537 if (self.user_id is None
538538 and self.name
539- and not self.name.startswith('*')):
539+ and self.name != '*anonymous'):
540540 return None
541541 return User.query.get(_id=self.user_id)
542542
--- a/Allura/allura/tests/model/test_auth.py
+++ b/Allura/allura/tests/model/test_auth.py
@@ -90,7 +90,7 @@ def test_project_role():
9090 c.user._id, project_id=c.project.root_project._id):
9191 assert pr.display()
9292 pr.special
93- assert pr.user in (c.user, None)
93+ assert pr.user in (c.user, None, M.User.anonymous())
9494
9595 @with_setup(setUp)
9696 def test_default_project_roles():