Code

py2.4 compat
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 10 Aug 2009 04:32:11 +0000 (04:32 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 10 Aug 2009 04:32:11 +0000 (04:32 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4346 57a73879-2fb5-44c3-a270-3262357dd7e2

test/test_xmlrpc.py

index ac4e897ec42e4b6189e945b1271243cc4abfb4c2..4eb7c412cab5f43017c6a17a649657e3f9214766 100644 (file)
@@ -98,18 +98,20 @@ class TestCase(unittest.TestCase):
     def testAuthAllowedEdit(self):
         self.db.setCurrentUser('admin')
         try:
-            self.server.set('user2', 'realname=someone')
-        except Unauthorised, err:
-            self.fail('raised %s'%err)
+            try:
+                self.server.set('user2', 'realname=someone')
+            except Unauthorised, err:
+                self.fail('raised %s'%err)
         finally:
             self.db.setCurrentUser('joe')
 
     def testAuthAllowedCreate(self):
         self.db.setCurrentUser('admin')
         try:
-            self.server.create('user', 'username=blah')
-        except Unauthorised, err:
-            self.fail('raised %s'%err)
+            try:
+                self.server.create('user', 'username=blah')
+            except Unauthorised, err:
+                self.fail('raised %s'%err)
         finally:
             self.db.setCurrentUser('joe')