From 4c85d94bc04b7c1d5d0af42c00dcea986d6ecbb2 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Sun, 20 Aug 2023 16:09:07 +0200 Subject: [PATCH] Fixed utils_tests.test_lazyobject.SimpleLazyObjectPickleTestCase. SimpleLazyObjectPickleTestCase executes database queries so it must inherit from django.test.TestCase. --- tests/utils_tests/test_lazyobject.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/utils_tests/test_lazyobject.py b/tests/utils_tests/test_lazyobject.py index 134ae77750..a95335413e 100644 --- a/tests/utils_tests/test_lazyobject.py +++ b/tests/utils_tests/test_lazyobject.py @@ -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