mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Cleaned up exception message checking in some tests.
This commit is contained in:
parent
58ad030d05
commit
95b7699ffc
6 changed files with 15 additions and 9 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue