mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #24621 -- Added a test for SessionBase.pop()'s 'default' argument.
This commit is contained in:
parent
08cd6a0e56
commit
973f393761
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user