github3_utils.testing
¶
Fixtures for pytest.
Attention
This module has the following additional requirements:
betamax>=0.8.1 pytest>=6.0.0
These can be installed as follows:
python -m pip install github3-utils[testing]
New in version 0.2.0.
To use this module you need to add, at a minimum, the following to your conftest.py
:
from betamax import Betamax
pytest_plugins = ("github3_utils.testing", )
with Betamax.configure() as config:
config.cassette_library_dir = "<path to cassettes directory>"
Functions:
|
Provides a Betamax cassette scoped to the test function which record and plays back interactions with the GitHub API. |
Provides an instance of |
|
|
Provides a Betamax cassette scoped to the test module which record and plays back interactions with the GitHub API. |
-
fixture
cassette
[source]¶ Scope: function
Provides a Betamax cassette scoped to the test function which record and plays back interactions with the GitHub API.
-
fixture
github_client
[source]¶ Scope: function
Provides an instance of
github3.github.GitHub
, using a fake token to authenticate.- Return type