From 95b7699ffc4bdb32a504fccfd127f1b76a8a1d1c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 15 Mar 2019 16:27:57 -0700 Subject: Cleaned up exception message checking in some tests. --- tests/test_client/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_client') 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: -- cgit v1.3