Adjust d7853c5 to not show ignorable warnings when running tests.

This commit is contained in:
Malcolm Tredinnick 2012-09-08 20:28:31 -04:00
parent a3b2136b28
commit 5e99a3d41b
1 changed files with 2 additions and 0 deletions

View File

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