mirror of
https://github.com/django/django.git
synced 2025-11-23 12:26:57 +00:00
Fixed #32980 -- Made models cache related managers.
This commit is contained in:
parent
ba9ced3e9a
commit
4f8c7fd9d9
10 changed files with 173 additions and 13 deletions
|
|
@ -1,8 +1,11 @@
|
|||
from django.db.models.base import ModelState, ModelStateFieldsCacheDescriptor
|
||||
from django.db.models.base import ModelState, ModelStateCacheDescriptor
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
|
||||
class ModelStateTests(SimpleTestCase):
|
||||
|
||||
def test_fields_cache_descriptor(self):
|
||||
self.assertIsInstance(ModelState.fields_cache, ModelStateFieldsCacheDescriptor)
|
||||
self.assertIsInstance(ModelState.fields_cache, ModelStateCacheDescriptor)
|
||||
|
||||
def test_related_managers_descriptor(self):
|
||||
self.assertIsInstance(ModelState.related_managers_cache, ModelStateCacheDescriptor)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue