mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #28893 -- Removed unnecessary dict.items() calls.
This commit is contained in:
parent
183fb7b2b9
commit
a862af3839
14 changed files with 25 additions and 25 deletions
|
@ -176,7 +176,7 @@ class IntrospectionTests(TransactionTestCase):
|
|||
constraints = connection.introspection.get_constraints(cursor, Article._meta.db_table)
|
||||
index = {}
|
||||
index2 = {}
|
||||
for key, val in constraints.items():
|
||||
for val in constraints.values():
|
||||
if val['columns'] == ['headline', 'pub_date']:
|
||||
index = val
|
||||
if val['columns'] == ['headline', 'response_to_id', 'pub_date', 'reporter_id']:
|
||||
|
@ -198,7 +198,7 @@ class IntrospectionTests(TransactionTestCase):
|
|||
['response_to_id'],
|
||||
['headline', 'response_to_id', 'pub_date', 'reporter_id'],
|
||||
]
|
||||
for key, val in constraints.items():
|
||||
for val in constraints.values():
|
||||
if val['index'] and not (val['primary_key'] or val['unique']):
|
||||
self.assertIn(val['columns'], expected_columns)
|
||||
self.assertEqual(val['orders'], ['ASC'] * len(val['columns']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue