diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-03-15 16:27:57 -0700 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-03-15 19:28:13 -0400 |
| commit | 87fad5a3925c39380f79643387cdc5adde1d8863 (patch) | |
| tree | 7df9bb4021ec73803e073f087388be92efc64533 /tests/test_client/tests.py | |
| parent | 985e6c224be0681d7a753b9ded4646024d332bc7 (diff) | |
[2.2.x] Cleaned up exception message checking in some tests.
Backport of 95b7699ffc4bdb32a504fccfd127f1b76a8a1d1c from master.
Diffstat (limited to 'tests/test_client/tests.py')
| -rw-r--r-- | tests/test_client/tests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_client/tests.py b/tests/test_client/tests.py index 432865328f..aa4f0e94b5 100644 --- a/tests/test_client/tests.py +++ b/tests/test_client/tests.py @@ -815,8 +815,9 @@ class ClientTest(TestCase): def test_response_raises_multi_arg_exception(self): """A request may raise an exception with more than one required arg.""" - with self.assertRaises(TwoArgException): + with self.assertRaises(TwoArgException) as cm: self.client.get('/two_arg_exception/') + self.assertEqual(cm.exception.args, ('one', 'two')) def test_uploading_temp_file(self): with tempfile.TemporaryFile() as test_file: |
