test/api: assert return code for api.exception
Check that the exit code for `api.exception`, called via the `api.exception_handler` helper, is the correct one.
This commit is contained in:
parent
aaa51e22a6
commit
71f7bf8930
1 changed files with 1 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ class TestAPI(unittest.TestCase):
|
|||
p = mp.Process(target=exception, args=(path, ))
|
||||
p.start()
|
||||
p.join()
|
||||
self.assertEqual(p.exitcode, 2)
|
||||
self.assertIsNotNone(api.error, "Error not set")
|
||||
self.assertIn("type", api.error, "Error has no 'type' set")
|
||||
self.assertEqual("exception", api.error["type"], "Not an exception")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue