Bad Test
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
Inizia da tests/test_graphqlview.py, con il test collegato intorno alla riga 481, e confronta il suo nome, la configurazione e le asserzioni con il comportamento proposto di rimappatura del contesto. Rinomina o sostituisci il test secondo necessità, quindi esegui il test pytest pertinente per confermare che la risposta contenga request e non CUSTOM CONTEXT.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
FYI: this test will never run (or it will always run, but it shouldn't).
I'm in the process of porting this to aiohttp and found this...
I believe the test is all kinds of wrong.
- its name doesn't match what it does (it has nothing to do with pretty printing)
- I don't understand why 'request' would resolve to
{}. I'd assume it'd be repr'd to<Request ...>
I believe the test ought to test that 'CUSTOM CONTEXT' is replaced with an empty dict. at least that's what the code will do when get_context(request) is called and it discovers that self.context is not a dict.
Here's my replacement test (note, this isn't written for sanic, but the premise holds):
@pytest.mark.asyncio
async def test_context_remapped(self, client, url_builder):
response = await client.get(url_builder(query='{context}'))
_json = await response.json()
assert response.status == 200
assert 'request' in _json['data']['context']
assert 'CUSTOM CONTEXT' not in _json['data']['context']
- Lingua principale
- Python
- Stelle
- 148
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphql-python/sanic-graphql
-
Will this ever be updated? Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
graphql-python/sanic-graphql#25 · 4 reazioni ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
graphql-python/sanic-graphql#24 · 1 commento · 1 reazione ·
-
Bad Example and Bad Doc Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Minimal async fails Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
graphql-python/sanic-graphql#19 · 5 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
Tutte le issue di graphql-python/sanic-graphql
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·