Skip to content

Commit 5e99a3d

Browse files
committed
Adjust d7853c5 to not show ignorable warnings when running tests.
1 parent a3b2136 commit 5e99a3d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django/contrib/sessions/tests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ def test_exists_searches_cache_first(self):
304304
def test_load_overlong_key(self):
305305
# Some backends might issue a warning
306306
with warnings.catch_warnings():
307+
warnings.simplefilter("ignore")
307308
self.session._session_key = (string.ascii_letters + string.digits) * 20
308309
self.assertEqual(self.session.load(), {})
309310

@@ -353,6 +354,7 @@ class CacheSessionTests(SessionTestsMixin, unittest.TestCase):
353354
def test_load_overlong_key(self):
354355
# Some backends might issue a warning
355356
with warnings.catch_warnings():
357+
warnings.simplefilter("ignore")
356358
self.session._session_key = (string.ascii_letters + string.digits) * 20
357359
self.assertEqual(self.session.load(), {})
358360

0 commit comments

Comments
 (0)