From 973f393761253f5fbf031f435d103545f1927041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20No=C3=A9?= Date: Wed, 20 Apr 2016 17:04:58 +0200 Subject: [PATCH] Refs #24621 -- Added a test for SessionBase.pop()'s 'default' argument. --- tests/sessions_tests/tests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py index 5c4e133567..cf4c6dfaa2 100644 --- a/tests/sessions_tests/tests.py +++ b/tests/sessions_tests/tests.py @@ -83,6 +83,11 @@ class SessionTestsMixin(object): self.assertTrue(self.session.accessed) self.assertFalse(self.session.modified) + def test_pop_default_named_argument(self): + self.assertEqual(self.session.pop('some key', default='does not exist'), 'does not exist') + self.assertTrue(self.session.accessed) + self.assertFalse(self.session.modified) + def test_setdefault(self): self.assertEqual(self.session.setdefault('foo', 'bar'), 'bar') self.assertEqual(self.session.setdefault('foo', 'baz'), 'bar')