mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #28893 -- Removed unnecessary dict.items() calls.
This commit is contained in:
@@ -33,7 +33,7 @@ class DatabaseCreationTests(SimpleTestCase):
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
for name, value in kwargs.items():
|
||||
for name in kwargs:
|
||||
if name in saved_values:
|
||||
settings[name] = saved_values[name]
|
||||
else:
|
||||
|
||||
@@ -27,7 +27,7 @@ class ServerSideCursorsPostgres(TestCase):
|
||||
|
||||
@contextmanager
|
||||
def override_db_setting(self, **kwargs):
|
||||
for setting, value in kwargs.items():
|
||||
for setting in kwargs:
|
||||
original_value = connection.settings_dict.get(setting)
|
||||
if setting in connection.settings_dict:
|
||||
self.addCleanup(operator.setitem, connection.settings_dict, setting, original_value)
|
||||
|
||||
Reference in New Issue
Block a user