From 81f844940279140d27578fc6a5b134763ffcceb6 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 18 Apr 2017 17:56:59 +0200 Subject: [PATCH] Refs #28066 -- Fixed nondeterministic ordering test failure in sessions_tests. Thanks Tim Graham for the review. --- tests/sessions_tests/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sessions_tests/tests.py b/tests/sessions_tests/tests.py index bf1e05fbec..552b80daeb 100644 --- a/tests/sessions_tests/tests.py +++ b/tests/sessions_tests/tests.py @@ -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'