def test_reject_play_game(self, mock_method): button_shooter = ButtonShooterWindow("username") button_shooter.initialize_game = mock.MagicMock() button_shooter.show = mock.MagicMock() button_shooter.required_targets = 100 button_shooter.show_start_screen = mock.MagicMock( return_value=QMessageBox.RejectRole) button_shooter.emit_game_menu_signal = mock.MagicMock() button_shooter.play_game(1) button_shooter.emit_game_menu_signal.assert_called()
def test_play_game(self, mock_method): button_shooter = ButtonShooterWindow("username") button_shooter.initialize_game = mock.MagicMock() button_shooter.show = mock.MagicMock() button_shooter.required_targets = 100 button_shooter.show_start_screen = mock.MagicMock( return_value=QMessageBox.AcceptRole) button_shooter.timer = mock.MagicMock() button_shooter.timer.start = mock.MagicMock() button_shooter.show_buttons = mock.MagicMock() button_shooter.play_game(1) button_shooter.show_buttons.assert_called()