Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Stale Access application path-param tests expect valid account_id to raise

Aperta Adatta ai principianti
#2,747 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, testing

Direzione di ricerca

Inizia con i test saltati dei parametri del percorso in tests/api_resources/zero_trust/access/test_applications.py, in particolare test_path_params_create_overload_1 e i casi sync e async di test_path_params_list. Confronta le relative aspettative con src/cloudflare/resources/zero_trust/access/applications/applications.py, quindi esegui i test mirati dell’applicazione. Il lavoro è completo quando un account_id non vuoto viene accettato e solo gli identificatori di account e zona vuoti o mancanti generano errori.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Confirm this is a Python library issue and not an underlying Cloudflare API issue.
  • This is an issue with the Python library
Describe the bug

Some skipped path-param tests for zero_trust.access.applications appear to be stale after the account/zone path selection logic was fixed.

For example, these tests still expect ValueError("You must provide either account_id or zone_id") when account_id="account_id" is provided:

  • test_path_params_create_overload_1 in tests/api_resources/zero_trust/access/test_applications.py
  • test_path_params_list in both sync and async sections of the same file

That expectation now contradicts the current resource implementation, which correctly treats account_id as sufficient and builds an /accounts/{account_id}/... path. This looks related to the behavior discussed in #2705, where passing account_id should not require zone_id.

I noticed this while checking #2705. The runtime behavior on current main looks correct, but the skipped generated tests still encode the old/broken expectation.

To Reproduce
  1. Inspect the current main version of tests/api_resources/zero_trust/access/test_applications.py.
  2. See the valid-account_id branches in these tests:
  3. Compare with the current implementation in src/cloudflare/resources/zero_trust/access/applications/applications.py, where account_id selects the accounts path and does not need zone_id.
  4. A minimal local smoke check confirms the current behavior builds GET /accounts/acct_123/access/apps for client.zero_trust.access.applications.list(account_id="acct_123").

Expected: the path-param tests should only expect an error for empty/missing account and zone identifiers, not for a non-empty account_id.

Code snippets
client.zero_trust.access.applications.list(account_id="acct_123")
# current main builds: GET /accounts/acct_123/access/apps
OS

all

Python version

3.11.1

Library version

main / 5.7.0

Lingua principale
Python
Stelle
509
Fork
150
Merge medio
3h 15m
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/cloudflare-python

Tutte le issue di cloudflare/cloudflare-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.