def METHOD_NAME(previous_sender_login, create_issue):
    config = ServiceConfig()
    config.command_handler_work_dir = SANDCASTLE_WORK_DIR
    flexmock(ServiceConfig).should_receive("get_service_config").and_return(config)
    flexmock(GithubInstallationModel).should_receive("get_by_account_login").and_return(
        flexmock(sender_login=previous_sender_login)
    )
    flexmock(GithubInstallationModel).should_receive("create_or_update").once()
    flexmock(AllowlistModel).should_receive("get_namespace").with_args(
        "github.com/packit-service"
    ).and_return(flexmock())
    flexmock(Allowlist).should_receive("is_namespace_or_parent_approved").with_args(
        "github.com/packit-service"
    ).and_return(False)
    flexmock(Allowlist).should_receive("is_denied").with_args(
        "github.com/packit-service"
    ).and_return(False)
    if create_issue:
        flexmock(Allowlist).should_receive(
            "is_github_username_from_fas_account_matching"
        ).with_args(fas_account="jpopelka", sender_login="jpopelka").and_return(False)
        flexmock(PackageConfigGetter).should_receive("create_issue_if_needed").once()
        flexmock(AllowlistModel).should_receive("add_namespace").once()
    else:
        flexmock(PackageConfigGetter).should_receive("create_issue_if_needed").never()
    flexmock(Signature).should_receive("apply_async").once()
    flexmock(Pushgateway).should_receive("push").times(2).and_return()
    processing_results = SteveJobs().process_message(installation_event())
    event_dict, job, job_config, package_config = get_parameters_from_results(
        processing_results
    )
    assert json.dumps(event_dict)
    results = run_installation_handler(
        package_config=package_config,
        event=event_dict,
        job_config=job_config,
    )
    assert first_dict_value(results["job"])["success"]