1
0
mirror of https://github.com/django/django.git synced 2024-12-22 09:05:43 +00:00

Fixed utils_tests.test_lazyobject.SimpleLazyObjectPickleTestCase.

SimpleLazyObjectPickleTestCase executes database queries so it must
inherit from django.test.TestCase.
This commit is contained in:
Mariusz Felisiak 2023-08-20 16:09:07 +02:00 committed by GitHub
parent 517d3bb4dd
commit 4c85d94bc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,10 @@
import copy
import pickle
import sys
import unittest
import warnings
from unittest import TestCase
from django.test import TestCase
from django.utils.functional import LazyObject, SimpleLazyObject, empty
from .models import Category, CategoryInfo
@ -20,7 +21,7 @@ class Foo:
return self.foo == other.foo
class LazyObjectTestCase(TestCase):
class LazyObjectTestCase(unittest.TestCase):
def lazy_wrap(self, wrapped_object):
"""
Wrap the given object into a LazyObject