Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug mortale dei test: convertire tutto a json #101

Open
GendoIkari opened this issue Jun 20, 2017 · 0 comments
Open

bug mortale dei test: convertire tutto a json #101

GendoIkari opened this issue Jun 20, 2017 · 0 comments
Assignees

Comments

@GendoIkari
Copy link
Contributor

In questo momento stiamo usando nelle view RequestParser, questo ci rende compatibili sia con i json, sia con i parametri della post.
Questo ha nascosto un bug latente, ovvero che i test hanno le chiamate alla nostra api con il content-type sbagliato. Nei test non stiamo mandando json, ma stiamo mandando delle chiamate con parametri nella post/put/patch invece che con json.
Quando RequestParser non ci sara' piu', tutti questi test moriranno.

Il fix e':

  • implementare la open come la open_with_auth in classe base
  • entrambe mettano il corretto content-type: application/json come default
  • data deve essere serializzato come json
  • risolvere i problemi di dati non serializzabili (UUID, etc...) nel modo meno invasivo possibile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants