Mercurial > p > roundup > code
diff test/test_cgi.py @ 4624:21705126dafa
Committed edited fix for issue2550712 by Cedric Krier.
| author | Bernhard Reiter <bernhard@intevation.de> |
|---|---|
| date | Mon, 14 May 2012 17:46:15 +0200 |
| parents | 4f9c3858b671 |
| children | 2f66d44616ad |
line wrap: on
line diff
--- a/test/test_cgi.py Mon May 14 14:17:07 2012 +0200 +++ b/test/test_cgi.py Mon May 14 17:46:15 2012 +0200 @@ -930,6 +930,16 @@ '8,resolved\r\n', output.getvalue()) + def testCSVExportBadColumnName(self): + cl = self._make_client({'@columns': 'falseid,name'}, nodeid=None, + userid='1') + cl.classname = 'status' + output = StringIO.StringIO() + cl.request = MockNull() + cl.request.wfile = output + self.assertRaises(exceptions.SeriousError, + actions.ExportCSVAction(cl).handle) + def testCSVExportFailPermission(self): cl = self._make_client({'@columns': 'id,email,password'}, nodeid=None, userid='2') @@ -937,7 +947,9 @@ output = StringIO.StringIO() cl.request = MockNull() cl.request.wfile = output - self.assertRaises(exceptions.Unauthorised, + # used to be self.assertRaises(exceptions.Unauthorised, + # but not acting like the column name is not found + self.assertRaises(exceptions.SeriousError, actions.ExportCSVAction(cl).handle)
