Fixed #24667 --- Repaired model_fields cardinality test
This commit is contained in:
parent
9346e45f84
commit
36eab95e7f
|
@ -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