51👍
✅
According to the docs:
from django.test import TestCase
class SimpleTest(TestCase):
def test_details(self):
# Issue a GET request.
self.client.get('/customer/details/')
session = self.client.session
self.assertEqual(session["somekey"], "test")
Source:stackexchange.com