mirror of
https://github.com/django/django.git
synced 2025-10-17 13:58:24 +00:00
Fixed #29708 -- Deprecated PickleSerializer.
This commit is contained in:
parent
c920387fab
commit
45a42aabfa
9 changed files with 48 additions and 26 deletions
|
@ -4,7 +4,8 @@ from django.contrib.contenttypes.models import ContentType
|
|||
from django.contrib.sessions.backends.db import SessionStore
|
||||
from django.db import models
|
||||
from django.db.models import Count
|
||||
from django.test import TestCase, override_settings
|
||||
from django.test import TestCase, ignore_warnings, override_settings
|
||||
from django.utils.deprecation import RemovedInDjango50Warning
|
||||
|
||||
from .models import (
|
||||
Base, Child, Derived, Feature, Item, ItemAndSimpleItem, Leaf, Location,
|
||||
|
@ -91,6 +92,7 @@ class DeferRegressionTest(TestCase):
|
|||
list(SimpleItem.objects.annotate(Count('feature')).only('name')),
|
||||
list)
|
||||
|
||||
@ignore_warnings(category=RemovedInDjango50Warning)
|
||||
@override_settings(SESSION_SERIALIZER='django.contrib.sessions.serializers.PickleSerializer')
|
||||
def test_ticket_12163(self):
|
||||
# Test for #12163 - Pickling error saving session with unsaved model
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue