Mercurial > p > roundup > code
diff test/test_actions.py @ 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 | 37b57da3374f |
| children | 9ca5cbffa0c4 |
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
