コード例 #1
0
 def test_obtain_standing_true(self, mock_user_input):
     self.assertEqual(obtain_standing(), True)
コード例 #2
0
 def test_obtain_standing_recursion(self, mock_user_input):
     self.assertEqual(obtain_standing(), False)
コード例 #3
0
 def test_obtain_standing_type(self, mock_user_input):
     self.assertEqual(type(obtain_standing()), bool)
コード例 #4
0
 def test_obtain_standing_incorrect(self, mock_stdout, mock_user_input):
     expected = "Please enter one of the listed options by number!\n"
     obtain_standing()
     self.assertEqual(mock_stdout.getvalue(), expected)