summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index fd7b7869ba..1376ea9203 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -28,7 +28,6 @@ from django.db.migrations.recorder import MigrationRecorder
from django.test import (
LiveServerTestCase, SimpleTestCase, TestCase, mock, override_settings,
)
-from django.test.runner import DiscoverRunner
from django.utils._os import npath, upath
from django.utils.encoding import force_text
from django.utils.six import PY2, PY3, StringIO
@@ -1276,46 +1275,6 @@ class ManageCheck(AdminScriptTestCase):
self.assertNoOutput(out)
-class CustomTestRunner(DiscoverRunner):
-
- def __init__(self, *args, **kwargs):
- assert 'liveserver' not in kwargs
- super(CustomTestRunner, self).__init__(*args, **kwargs)
-
- def run_tests(self, test_labels, extra_tests=None, **kwargs):
- pass
-
-
-class ManageTestCommand(AdminScriptTestCase):
- def test_liveserver(self):
- """
- Ensure that the --liveserver option sets the environment variable
- correctly.
- Refs #2879.
- """
-
- # Backup original state
- address_predefined = 'DJANGO_LIVE_TEST_SERVER_ADDRESS' in os.environ
- old_address = os.environ.get('DJANGO_LIVE_TEST_SERVER_ADDRESS')
-
- call_command('test', verbosity=0, testrunner='admin_scripts.tests.CustomTestRunner')
-
- # Original state hasn't changed
- self.assertEqual('DJANGO_LIVE_TEST_SERVER_ADDRESS' in os.environ, address_predefined)
- self.assertEqual(os.environ.get('DJANGO_LIVE_TEST_SERVER_ADDRESS'), old_address)
-
- call_command('test', verbosity=0, testrunner='admin_scripts.tests.CustomTestRunner', liveserver='blah')
-
- # Variable was correctly set
- self.assertEqual(os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'], 'blah')
-
- # Restore original state
- if address_predefined:
- os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = old_address
- else:
- del os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS']
-
-
class ManageRunserver(AdminScriptTestCase):
def setUp(self):
from django.core.management.commands.runserver import Command