Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2023
1 parent 98871af commit 2600943
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_session.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import base64

import django
import pytest

import unittest
from datetime import timedelta
from typing import Optional, Type

import django
import pytest
from django.conf import settings
from django.contrib.sessions.backends.base import SessionBase
from django.contrib.sessions.backends.cache import SessionStore as CacheSession
Expand Down Expand Up @@ -304,6 +302,7 @@ def test_decode_failure_logged_to_security(self):
self.assertEqual({}, self.session.decode(bad_encode))
# The failed decode is logged.
self.assertIn("corrupted", cm.output[0])

def test_actual_expiry(self):
# this doesn't work with JSONSerializer (serializing timedelta)
with override_settings(
Expand Down Expand Up @@ -370,7 +369,7 @@ class SessionTests(SessionTestsMixin, unittest.TestCase):

@pytest.mark.skipif(
django.VERSION > (4, 2),
reason="PickleSerializer is removed as of https://code.djangoproject.com/ticket/29708"
reason="PickleSerializer is removed as of https://code.djangoproject.com/ticket/29708",
)
def test_actual_expiry(self):
if isinstance(
Expand Down

0 comments on commit 2600943

Please sign in to comment.