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

Create RequestsSessionNetwork #226

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Create RequestsSessionNetwork #226

wants to merge 3 commits into from

Conversation

jmoldow
Copy link
Contributor

@jmoldow jmoldow commented Aug 25, 2017

This class is the same as the former DefaultNetwork class,
except that it accepts an optional session constructor
parameter, for clients to specify a session of their choosing
rather than having it constructed automatically.

DefaultNetwork is aliased to RequestsSessionNetwork, for
backwards-compatibility.

This enables the boxsdk's testing framework to start using the
betamax to record real network calls and responses. Although
we currently only add one such test, this is a potential
alternative to mock-box functional tests in the future.

This also allows for dependents of boxsdk to write betamax
tests as well.

This class is the same as the former `DefaultNetwork` class,
except that it accepts an optional `session` constructor
parameter, for clients to specify a session of their choosing
rather than having it constructed automatically.

`DefaultNetwork` is aliased to `RequestsSessionNetwork`, for
backwards-compatibility.

This enables the boxsdk's testing framework to start using the
`betamax` to record real network calls and responses. Although
we currently only add one such test, this is a potential
alternative to mock-box functional tests in the future.

This also allows for dependents of boxsdk to write `betamax`
tests as well.
@boxcla
Copy link

boxcla commented Aug 25, 2017

Verified that @jmoldow has signed the CLA. Thanks for the pull request!

Move the betamax fixtures to an installable pytest plugin, so
that dependent applications can also make use of them.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants