How to apply integration tests (rather than unit tests) to a Flask RESTful API

后端 未结 4 1620
不知归路
不知归路 2020-12-14 01:36

[As per https://stackoverflow.com/a/46369945/1021819, the title should refer to integration tests rather than unit tests]

Suppose I\'d like to test the foll

4条回答
  •  青春惊慌失措
    2020-12-14 02:20

    What you're doing there is not unit testing. In every case, when using the requests library or the flask client, you're doing integration testing as you make actual http calls to the endpoints and test the interaction.

    Either the title of the question or the approach is not accurate.

提交回复
热议问题