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:27:57 -0400 |
commit | 95b7699ffc4bdb32a504fccfd127f1b76a8a1d1c (patch) | |
tree | 436ce672484e93cae672f96d8f91d88ed4e02912 /tests/test_client | |
parent | 58ad030d05fa50cfed327368ab61defca3303e02 (diff) | |
download | django-95b7699ffc4bdb32a504fccfd127f1b76a8a1d1c.tar.gz |
Cleaned up exception message checking in some tests.
Diffstat (limited to 'tests/test_client')
-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 02f5113890..84d245c05e 100644 --- a/tests/test_client/tests.py +++ b/tests/test_client/tests.py @@ -829,8 +829,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: |