Refs #28066 -- Fixed nondeterministic ordering test failure in sessions_tests.

Thanks Tim Graham for the review.
This commit is contained in:
Mariusz Felisiak 2017-04-18 17:56:59 +02:00 committed by GitHub
parent 63b36d6419
commit 81f8449402
1 changed files with 2 additions and 2 deletions

View File

@ -180,11 +180,11 @@ class SessionTestsMixin:
def test_cycle_with_no_session_cache(self):
self.session['a'], self.session['b'] = 'c', 'd'
self.session.save()
prev_data = list(self.session.items())
prev_data = self.session.items()
self.session = self.backend(self.session.session_key)
self.assertFalse(hasattr(self.session, '_session_cache'))
self.session.cycle_key()
self.assertEqual(list(self.session.items()), prev_data)
self.assertCountEqual(self.session.items(), prev_data)
def test_save_doesnt_clear_data(self):
self.session['a'] = 'b'