jeudi 11 mars 2021

Unit testing Flask application API endpoints

I have a Flask application and my routes are divided into Blueprints. I want to test my endpoints.

Is unit testing a single method enough for testing an endpoint? I guess not. Because my endpoints perform operations inside LXC container and then update DB and finally return JSON response. If I want to test if the functionality executed as expected, would it be called e2e test for an endpoint? If yes, should I only test the returned response in unit tests of methods?

Aucun commentaire:

Enregistrer un commentaire