mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
[1.8.x] Fixed #24667 --- Repaired model_fields cardinality test
Backport of 36eab95e7f
from master
This commit is contained in:
parent
1e0bf2cab9
commit
b8f203b3f2
@ -146,10 +146,10 @@ class FieldFlagsTests(test.TestCase):
|
||||
self.assertEqual(1, true_cardinality_flags)
|
||||
|
||||
def test_cardinality_m2m(self):
|
||||
m2m_type_fields = (
|
||||
m2m_type_fields = [
|
||||
f for f in self.all_fields
|
||||
if f.is_relation and f.many_to_many
|
||||
)
|
||||
]
|
||||
# Test classes are what we expect
|
||||
self.assertEqual(MANY_TO_MANY_CLASSES, {f.__class__ for f in m2m_type_fields})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user