allura
Révision | d9e6b55f1a5f9e85f067ede7ffc33c7abde0a0d9 (tree) |
---|---|
l'heure | 2011-06-01 11:34:39 |
Auteur | Rick Copeland <rcopeland@geek...> |
Commiter | Rick Copeland |
[#2191] Fix test
Signed-off-by: Rick Copeland <rcopeland@geek.net>
@@ -536,7 +536,7 @@ class ProjectRole(MappedClass): | ||
536 | 536 | def user(self): |
537 | 537 | if (self.user_id is None |
538 | 538 | and self.name |
539 | - and not self.name.startswith('*')): | |
539 | + and self.name != '*anonymous'): | |
540 | 540 | return None |
541 | 541 | return User.query.get(_id=self.user_id) |
542 | 542 |
@@ -90,7 +90,7 @@ def test_project_role(): | ||
90 | 90 | c.user._id, project_id=c.project.root_project._id): |
91 | 91 | assert pr.display() |
92 | 92 | pr.special |
93 | - assert pr.user in (c.user, None) | |
93 | + assert pr.user in (c.user, None, M.User.anonymous()) | |
94 | 94 | |
95 | 95 | @with_setup(setUp) |
96 | 96 | def test_default_project_roles(): |