summaryrefslogtreecommitdiff
path: root/tests/user_commands
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-02-05 09:11:54 -0800
committerTim Graham <timograham@gmail.com>2019-02-05 12:11:54 -0500
commit487d904bf253de2f5633f181a168f94086bcd6cb (patch)
treeb5b8bbe9e05ac5c4f978c9ede6061737f210322d /tests/user_commands
parent099c36d546cda842b44a93067d45e146e4ae77e5 (diff)
Simplified temporary directory handling in AdminScriptTestCase.
Use tempfile.TemporaryDirectory() in AdminScriptTestCase.setUp() to create and destroy a temporary directory for each test. It removes the need for individual tests to delete files. For test classes that don't use the temporary directory, inherit from SimpleTestCase.
Diffstat (limited to 'tests/user_commands')
-rw-r--r--tests/user_commands/tests.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index 25ab82baed..2d1f8f834d 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -234,9 +234,6 @@ class CommandRunTests(AdminScriptTestCase):
"""
Tests that need to run by simulating the command line, not by call_command.
"""
- def tearDown(self):
- self.remove_settings('settings.py')
-
def test_script_prefix_set_in_commands(self):
self.write_settings('settings.py', apps=['user_commands'], sdict={
'ROOT_URLCONF': '"user_commands.urls"',