Mercurial > p > roundup > code
comparison test/test_xmlrpc.py @ 5471:28613ada27db
check excpetion.args instead of exception.message
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sun, 29 Jul 2018 00:49:54 +0100 |
| parents | e46ce04d5bbc |
| children | 7f3dfdd6a620 |
comparison
equal
deleted
inserted
replaced
| 5470:e2baa4e6ed6d | 5471:28613ada27db |
|---|---|
| 167 | 167 |
| 168 # test a bogus action | 168 # test a bogus action |
| 169 with self.assertRaises(Exception) as cm: | 169 with self.assertRaises(Exception) as cm: |
| 170 self.server.action('bogus') | 170 self.server.action('bogus') |
| 171 print(cm.exception) | 171 print(cm.exception) |
| 172 self.assertEqual(cm.exception.message, | 172 self.assertEqual(cm.exception.args[0], |
| 173 'action "bogus" is not supported ') | 173 'action "bogus" is not supported ') |
| 174 | 174 |
| 175 def testAuthDeniedEdit(self): | 175 def testAuthDeniedEdit(self): |
| 176 # Wrong permissions (caught by roundup security module). | 176 # Wrong permissions (caught by roundup security module). |
| 177 self.assertRaises(Unauthorised, self.server.set, | 177 self.assertRaises(Unauthorised, self.server.set, |
