Exemple #1
0
def test_session_parse_with_session_with_identity():
    backend = SessionBackend()
    request = Request()
    request.session = {"identity": "test"}
    assert backend.parse(request) == "test"
Exemple #2
0
def test_session_parse_with_session_without_identity():
    backend = SessionBackend()
    request = Request()
    request.session = {}
    assert backend.parse(request) is None