Cleaned up exception message checking in some tests.

This commit is contained in:
Jon Dufresne 2019-03-15 16:27:57 -07:00 committed by Tim Graham
parent 58ad030d05
commit 95b7699ffc
6 changed files with 15 additions and 9 deletions

View file

@ -385,8 +385,8 @@ class FileUploadTests(TestCase):
file.write(b'a' * (2 ** 21))
file.seek(0)
# AttributeError: You cannot alter upload handlers after the upload has been processed.
with self.assertRaises(AttributeError):
msg = 'You cannot alter upload handlers after the upload has been processed.'
with self.assertRaisesMessage(AttributeError, msg):
self.client.post('/quota/broken/', {'f': file})
def test_fileupload_getlist(self):