mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +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:
parent
517d3bb4dd
commit
4c85d94bc0
@ -1,9 +1,10 @@
|
|||||||
import copy
|
import copy
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
import sys
|
||||||
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
from unittest import TestCase
|
|
||||||
|
|
||||||
|
from django.test import TestCase
|
||||||
from django.utils.functional import LazyObject, SimpleLazyObject, empty
|
from django.utils.functional import LazyObject, SimpleLazyObject, empty
|
||||||
|
|
||||||
from .models import Category, CategoryInfo
|
from .models import Category, CategoryInfo
|
||||||
@ -20,7 +21,7 @@ class Foo:
|
|||||||
return self.foo == other.foo
|
return self.foo == other.foo
|
||||||
|
|
||||||
|
|
||||||
class LazyObjectTestCase(TestCase):
|
class LazyObjectTestCase(unittest.TestCase):
|
||||||
def lazy_wrap(self, wrapped_object):
|
def lazy_wrap(self, wrapped_object):
|
||||||
"""
|
"""
|
||||||
Wrap the given object into a LazyObject
|
Wrap the given object into a LazyObject
|
||||||
|
Loading…
Reference in New Issue
Block a user