1
0
mirror of https://github.com/django/django.git synced 2025-01-03 15:06:09 +00:00

Removed a Python error message dependency in test_questioner_no_default_bad_user_entry_code().

This commit is contained in:
Jacob Walls 2021-12-18 13:41:41 -05:00 committed by Mariusz Felisiak
parent 1833a9eee9
commit 03cadb912c

View File

@ -59,7 +59,7 @@ class QuestionerHelperMethodsTests(SimpleTestCase):
def test_questioner_no_default_bad_user_entry_code(self, mock_input): def test_questioner_no_default_bad_user_entry_code(self, mock_input):
with captured_stdout() as stdout, self.assertRaises(SystemExit): with captured_stdout() as stdout, self.assertRaises(SystemExit):
self.questioner._ask_default() self.questioner._ask_default()
self.assertIn('Invalid input: unexpected EOF while parsing', stdout.getvalue()) self.assertIn('Invalid input: ', stdout.getvalue())
@mock.patch('builtins.input', side_effect=['', 'n']) @mock.patch('builtins.input', side_effect=['', 'n'])
def test_questioner_no_default_no_user_entry_boolean(self, mock_input): def test_questioner_no_default_no_user_entry_boolean(self, mock_input):