Closed ZuluPro closed 5 years ago
@koalalorenzo Any news ?
Hello @koalalorenzo Any news ?
How can we test this? I need proper specific tests that are validating one or more of your assumptions (Handlers, Retry, Timeouts etc etc).
That will work as an example for new users.
Write new tests, I don't know because current tests fill the coverage requirements.
But I can write some examples of Session
customization.
@koalalorenzo Hi I added doc in the README, maybe not perfect, do not hesitate to say to me. ;)
Sorry, I canβt merge without some tests validating what you just implemented.
Please add some tests
Hello @koalalorenzo I added a test customizing the session.
I was a bit hard to test because:
responses
doesn't allow hooksresponses
doesn't give a real request object, just a PreparedRequestI did the trick with the proxy feature π But in facts, I wrote this test but I didn't change the API, so new tests are really useful.
I think the session usage could ease several things:
This was using the high-level method available in requests.
Instead of that, here we use a Session object with exactly the same methods. The difference is that I'm storing this object as class attribute of BaseAPI and users could: