def test_invalid_input(self, mock_input):
     mock_input.side_effect = ['a', 'b', 'y']
     self.assertTrue(utils.yes_no(''))
 def test_no(self, mock_input):
     mock_input.return_value = 'no'
     self.assertFalse(utils.yes_no(''))
 def test_yes(self, mock_input):
     mock_input.return_value = 'yes'
     self.assertTrue(utils.yes_no(''))
Exemple #4
0
 def test_invalid_input(self, mock_input):
     mock_input.side_effect = ['a', 'b', 'y']
     self.assertTrue(utils.yes_no(''))
Exemple #5
0
 def test_no(self, mock_input):
     mock_input.return_value = 'no'
     self.assertFalse(utils.yes_no(''))
Exemple #6
0
 def test_yes(self, mock_input):
     mock_input.return_value = 'yes'
     self.assertTrue(utils.yes_no(''))