diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-19 08:35:16 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2021-02-10 10:20:54 +0100 |
| commit | ec0ff406311de88f4e2a135d784363424fe602aa (patch) | |
| tree | c1659b85ea145704a1b733d40a6a9a45e9332d0f /tests/user_commands/tests.py | |
| parent | 9c6ba876928fd20194ac3238dc06aeae66d7bd50 (diff) | |
Fixed #32355 -- Dropped support for Python 3.6 and 3.7
Diffstat (limited to 'tests/user_commands/tests.py')
| -rw-r--r-- | tests/user_commands/tests.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py index 9262e2717a..05415717c6 100644 --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -17,7 +17,6 @@ from django.test import SimpleTestCase, override_settings from django.test.utils import captured_stderr, extend_sys_path, ignore_warnings from django.utils import translation from django.utils.deprecation import RemovedInDjango41Warning -from django.utils.version import PY37 from .management.commands import dance @@ -337,20 +336,9 @@ class CommandTests(SimpleTestCase): msg = "Error: invalid choice: 'test' (choose from 'foo')" with self.assertRaisesMessage(CommandError, msg): management.call_command('subparser', 'test', 12) - if PY37: - # "required" option requires Python 3.7 and later. - msg = 'Error: the following arguments are required: subcommand' - with self.assertRaisesMessage(CommandError, msg): - management.call_command('subparser_dest', subcommand='foo', bar=12) - else: - msg = ( - 'Unknown option(s) for subparser_dest command: subcommand. ' - 'Valid options are: bar, force_color, help, no_color, ' - 'pythonpath, settings, skip_checks, stderr, stdout, ' - 'traceback, verbosity, version.' - ) - with self.assertRaisesMessage(TypeError, msg): - management.call_command('subparser_dest', subcommand='foo', bar=12) + msg = 'Error: the following arguments are required: subcommand' + with self.assertRaisesMessage(CommandError, msg): + management.call_command('subparser_dest', subcommand='foo', bar=12) def test_create_parser_kwargs(self): """BaseCommand.create_parser() passes kwargs to CommandParser.""" |
