summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 2e77f2c97a..6878da6f58 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -2304,8 +2304,8 @@ class Discovery(SimpleTestCase):
class CommandDBOptionChoiceTests(SimpleTestCase):
def test_invalid_choice_db_option(self):
expected_error = (
- "Error: argument --database: invalid choice: "
- "'deflaut' (choose from 'default', 'other')"
+ r"Error: argument --database: invalid choice: 'deflaut' "
+ r"\(choose from '?default'?, '?other'?\)"
)
args = [
"changepassword",
@@ -2326,7 +2326,7 @@ class CommandDBOptionChoiceTests(SimpleTestCase):
]
for arg in args:
- with self.assertRaisesMessage(CommandError, expected_error):
+ with self.assertRaisesRegex(CommandError, expected_error):
call_command(arg, "--database", "deflaut", verbosity=0)