Mercurial > p > roundup > code
changeset 6602:8269e89530e5
Test bad number path for ShowAction action.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 26 Jan 2022 20:46:42 -0500 |
| parents | 154f286061e2 |
| children | 57dc15ad648d |
| files | test/test_actions.py |
| diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/test/test_actions.py Wed Jan 26 17:30:59 2022 -0500 +++ b/test/test_actions.py Wed Jan 26 20:46:42 2022 -0500 @@ -82,6 +82,16 @@ self.assertRaisesMessage(ValueError, action.handle, 'No type specified') + def testShowActionBadNumber(self): + action = ShowAction(self.client) + self.assertRaises(ValueError, action.handle) + self.form.value.append(MiniFieldStorage('@number', 'A')) + self.form.value.append(MiniFieldStorage('@type', 'issue')) + with self.assertRaises(SeriousError) as ctx: + action.handle() + self.assertEqual('"A" is not an ID (issue ID required)', + ctx.exception.args[0]) + class RetireActionTestCase(ActionTestCase): def testRetireAction(self): self.client.db.security.hasPermission = true
