Code

fix broken tests by adding additional permissions now that we check for
authorschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 21 Oct 2010 19:53:51 +0000 (19:53 +0000)
committerschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 21 Oct 2010 19:53:51 +0000 (19:53 +0000)
permission on the destination class of a Link/Multilink when
searching...

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4555 57a73879-2fb5-44c3-a270-3262357dd7e2

test/test_cgi.py
test/test_xmlrpc.py

index 91878e9427582e539a544b9f79dd5bd2fd75e988..b8371bd3e2defd985843fec86b9764057838a442 100644 (file)
@@ -741,6 +741,10 @@ class FormTestCase(unittest.TestCase):
         p = self.db.security.addPermission(name='View', klass='iss',
             properties=("title", "status"), check=lambda x,y,z: True)
         self.db.security.addPermissionToRole('User', p)
+        # Allow all relevant roles access to stat
+        p = self.db.security.addPermission(name='View', klass='stat')
+        self.db.security.addPermissionToRole('User', p)
+        self.db.security.addPermissionToRole('Project', p)
         # Allow role "Project" access to whole iss
         p = self.db.security.addPermission(name='View', klass='iss')
         self.db.security.addPermissionToRole('Project', p)
index e88e291f45f29a3a9f5466572667cbb44b9d271c..04d4b9c38c944f6f79b2d49a15c8c480b8f57683 100644 (file)
@@ -134,6 +134,10 @@ class TestCase(unittest.TestCase):
         # Allow role "Project" access to whole issue
         p = self.db.security.addPermission(name='View', klass='issue')
         self.db.security.addPermissionToRole('Project', p)
+        # Allow all access to status:
+        p = self.db.security.addPermission(name='View', klass='status')
+        self.db.security.addPermissionToRole('User', p)
+        self.db.security.addPermissionToRole('Project', p)
 
         keyword = self.db.keyword
         status = self.db.status