def METHOD_NAME(
    fileupload_retrieve_mock, account_retrieve_mock, monkeypatch
):
    def mock_account_retrieve(*args, **kwargs):
        return FAKE_PLATFORM_ACCOUNT
    monkeypatch.setattr(stripe.Account, "retrieve", mock_account_retrieve)
    # create a Stripe Platform Account
    FAKE_PLATFORM_ACCOUNT.create()
    keys_and_values = (
        (PK_TEST, False, APIKeyType.publishable),
        (RK_TEST, False, APIKeyType.restricted),
        (SK_TEST, False, APIKeyType.secret),
        (PK_LIVE, True, APIKeyType.publishable),
        (RK_LIVE, True, APIKeyType.restricted),
        (SK_LIVE, True, APIKeyType.secret),
    )
    for secret, livemode, type in keys_and_values:
        # need to use ModelAdmin Form to create the APIKey instance
        form = APIKeyAdminCreateForm(
            data={"secret": secret},
        )
        form.save()
        key = form.instance
        assert key.livemode is livemode
        assert key.type is type