From 9dd1f9572fa5024deb1615266a0cd9995b27bd41 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 2 Sep 2021 10:56:56 +0200 Subject: [PATCH] [3.1.x] Fixed #33082 -- Fixed CommandTests.test_subparser_invalid_option on Python 3.9.7+. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Michał Górny for the report. Backport of 50ed545e2fa02c51e0d1559b83624f256e4b499b from main. --- tests/user_commands/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py index 0a3b6ae77e..ff600d986e 100644 --- a/tests/user_commands/tests.py +++ b/tests/user_commands/tests.py @@ -241,7 +241,7 @@ class CommandTests(SimpleTestCase): self.assertIn('bar', out.getvalue()) def test_subparser_invalid_option(self): - msg = "Error: invalid choice: 'test' (choose from 'foo')" + msg = "invalid choice: 'test' (choose from 'foo')" with self.assertRaisesMessage(CommandError, msg): management.call_command('subparser', 'test', 12) if PY37: