示例#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)
示例#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)
示例#3
0
 def test_get_menu_choice_cancel_without_choice(self, side_effect):
     result = IO.get_menu_choice(SIMPLE_MENU)
     self.assertEqual(result, -1)
示例#4
0
 def test_get_menu_choice_good_choice(self, side_effect):
     result = IO.get_menu_choice(SIMPLE_MENU)
     self.assertEqual(result, 0)