From d1ecb8cd38bd8922780731682b696adc97974240 Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Mon, 15 Feb 2016 19:48:28 +0300 Subject: [PATCH] Fix S3TestCase for precise env: we reraise TypeError as NotConfigured in this case --- tests/test_downloader_handlers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_downloader_handlers.py b/tests/test_downloader_handlers.py index e08d2e4a4..1885a53a0 100644 --- a/tests/test_downloader_handlers.py +++ b/tests/test_downloader_handlers.py @@ -490,8 +490,12 @@ class S3TestCase(unittest.TestCase): yield def test_extra_kw(self): - self.assertRaises( - TypeError, S3DownloadHandler, Settings(), extra_kw=True) + try: + S3DownloadHandler(Settings(), extra_kw=True) + except Exception as e: + self.assertIsInstance(e, (TypeError, NotConfigured)) + else: + assert False def test_request_signing1(self): # gets an object from the johnsmith bucket.