summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorДилян Палаузов <dilyanpalauzov@users.noreply.github.com>2017-11-13 16:15:49 -0500
committerTim Graham <timograham@gmail.com>2017-11-14 10:52:52 -0500
commit23bf4ad87f86f44a5ecf9aea722ced76fe7b7fdf (patch)
treeb6951dcd0887643851803becb4ec608eeab6ba68 /tests
parenta2ec1e6b2d05a1de86a6d02d1e035250b9fefa77 (diff)
Fixed #28795 -- Removed 'not in' checks and used dict.setdefault().
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index 57b8a45404..ae2d693ac2 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -455,8 +455,7 @@ if __name__ == "__main__":
if options.settings:
os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
else:
- if "DJANGO_SETTINGS_MODULE" not in os.environ:
- os.environ['DJANGO_SETTINGS_MODULE'] = 'test_sqlite'
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_sqlite')
options.settings = os.environ['DJANGO_SETTINGS_MODULE']
if options.selenium: