Test we can use Session.get_decoded to retrieve data stored in normal way
(self)
| 679 | self.assertEqual(str(s), session_key) |
| 680 | |
| 681 | def test_session_get_decoded(self): |
| 682 | """ |
| 683 | Test we can use Session.get_decoded to retrieve data stored |
| 684 | in normal way |
| 685 | """ |
| 686 | self.session["x"] = 1 |
| 687 | self.session.save() |
| 688 | |
| 689 | s = self.model.objects.get(session_key=self.session.session_key) |
| 690 | |
| 691 | self.assertEqual(s.get_decoded(), {"x": 1}) |
| 692 | |
| 693 | def test_sessionmanager_save(self): |
| 694 | """ |
nothing calls this directly
no test coverage detected