def test_play_win_2(self, comp): # Prepare test rpsgame.__main__.user_take.get.return_value = PAPER # Run test play() # Evaluate test for callargs in rpsgame.__main__.Result.set.call_args_list: args = callargs.args[0] self.assertEqual(args, WIN_GAME_2, "The won game was not " "declare as such")
def test_play_loose_3(self, comp): # Prepare test rpsgame.__main__.user_take.get.return_value = SCISSORS # Run test play() # Evaluate test for callargs in rpsgame.__main__.Result.set.call_args_list: args = callargs.args[0] self.assertEqual(args, LOOSE_GAME_3, "The lost game was not " "declare as such")
def test_play_invalid(self): # Prepare test rpsgame.__main__.user_take.get.return_value = "Wrong" # Run test play() # Evaluate test for callargs in rpsgame.__main__.Result.set.call_args_list: args = callargs.args[0] self.assertEqual(args, INVALID_CHOICE, "The invalid choice was " "not declare as such")