I've written a small flask rest api application and a related client library that uses requests to interface with the api.  And now I'm writing test cases using pytest.  The tests directly against the flask app run fine using the built in test client.
However, now I'm trying to run tests against the flask app through the client library, and it's failing with errors like:

InvalidSchema("No connection adapters were found for '%s'" % url)

As I understand, I can separately mock out the requests calls, but is there a way I can test the client library directly against the flask application?
If you test client library it better to choose mocks your API.
But if you want to test client(library) <-> server(flask) integration you need to make some preparation of environment. Like configure client, start server on the same host and port. And then run the tests.
Testing a flask application with a client that uses requests