Example #1
0
 def test_get_menu_choice_cancel_when_cant_without_choice(self, side_effect):
     result = IO.get_menu_choice(SIMPLE_MENU, show_cancel=False)
     self.assertEqual(result, 0)
Example #2
0
 def test_get_menu_choice_bad_input(self, side_effect):
     # Test un mauvais caractère puis quitte
     result = IO.get_menu_choice(SIMPLE_MENU)
     self.assertEqual(result, -1)
Example #3
0
 def test_get_menu_choice_cancel_without_choice(self, side_effect):
     result = IO.get_menu_choice(SIMPLE_MENU)
     self.assertEqual(result, -1)
Example #4
0
 def test_get_menu_choice_good_choice(self, side_effect):
     result = IO.get_menu_choice(SIMPLE_MENU)
     self.assertEqual(result, 0)