diff options
| author | Tim Graham <timograham@gmail.com> | 2017-12-06 17:17:59 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-06 17:17:59 -0500 |
| commit | a862af383969ade774f6b0fa1d331bc87b188b89 (patch) | |
| tree | 57a264753921cb1ac689efeb9b78dd43fcdd1db0 /tests/introspection | |
| parent | 183fb7b2b9778f7d7cc91f5a7e5afec61b85179e (diff) | |
| download | django-a862af383969ade774f6b0fa1d331bc87b188b89.tar.gz | |
Fixed #28893 -- Removed unnecessary dict.items() calls.
Diffstat (limited to 'tests/introspection')
| -rw-r--r-- | tests/introspection/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py index 63817a5e3d..a66ecaba03 100644 --- a/tests/introspection/tests.py +++ b/tests/introspection/tests.py @@ -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'])) |
