Loading django/contrib/sessions/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase): def test_load_overlong_key(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.session._session_key = (string.ascii_letters + string.digits) * 20 self.assertEqual(self.session.load(), {}) self.assertEqual(len(w), 1) Loading tests/regressiontests/logging_tests/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ class PatchLoggingConfigTest(TestCase): config = copy.deepcopy(OLD_LOGGING) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") compat_patch_logging_config(config) self.assertEqual(len(w), 1) Loading tests/regressiontests/requests/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,7 @@ class RequestsTests(unittest.TestCase): 'wsgi.input': ExplodingStringIO(payload)}) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") with self.assertRaises(UnreadablePostError): request.raw_post_data self.assertEqual(len(w), 1) tests/regressiontests/utils/text.py +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_words(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.assertEqual(u'The quick brown fox jumped over the lazy dog.', text.truncate_words(u'The quick brown fox jumped over the lazy dog.', 10)) self.assertEqual(u'The quick brown fox ...', Loading @@ -83,6 +84,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_html_words(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.assertEqual(u'<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', text.truncate_html_words('<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', 10)) self.assertEqual(u'<p><strong><em>The quick brown fox ...</em></strong></p>', Loading Loading
django/contrib/sessions/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -352,6 +352,7 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase): def test_load_overlong_key(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.session._session_key = (string.ascii_letters + string.digits) * 20 self.assertEqual(self.session.load(), {}) self.assertEqual(len(w), 1) Loading
tests/regressiontests/logging_tests/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ class PatchLoggingConfigTest(TestCase): config = copy.deepcopy(OLD_LOGGING) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") compat_patch_logging_config(config) self.assertEqual(len(w), 1) Loading
tests/regressiontests/requests/tests.py +1 −0 Original line number Diff line number Diff line Loading @@ -415,6 +415,7 @@ class RequestsTests(unittest.TestCase): 'wsgi.input': ExplodingStringIO(payload)}) with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") with self.assertRaises(UnreadablePostError): request.raw_post_data self.assertEqual(len(w), 1)
tests/regressiontests/utils/text.py +2 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_words(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.assertEqual(u'The quick brown fox jumped over the lazy dog.', text.truncate_words(u'The quick brown fox jumped over the lazy dog.', 10)) self.assertEqual(u'The quick brown fox ...', Loading @@ -83,6 +84,7 @@ class TestUtilsText(SimpleTestCase): def test_old_truncate_html_words(self): with warnings.catch_warnings(record=True) as w: warnings.simplefilter("always") self.assertEqual(u'<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', text.truncate_html_words('<p><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>', 10)) self.assertEqual(u'<p><strong><em>The quick brown fox ...</em></strong></p>', Loading