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

How to setup common VCR config for all tests #39

Closed
northtree opened this issue Feb 11, 2020 · 2 comments
Closed

How to setup common VCR config for all tests #39

northtree opened this issue Feb 11, 2020 · 2 comments

Comments

@northtree
Copy link

The following config seems not working under tests/__init__.py, but works within tests/test_foo.py, tests/test_bar.py...

import pytest


@pytest.fixture(scope='module', autouse=True)
def vcr_config():
  return {'ignore_hosts': ['oauth2.googleapis.com']}
@Stranger6667
Copy link
Collaborator

It should be in conftest.py, pytest collects fixtures from conftest.py files (in most common cases)

@Stranger6667
Copy link
Collaborator

Hopefully, the problem is resolved now. We can add some clarification to our Configuration section as a part of #49.

Feel free to reopen this issue in case of any further questions

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

No branches or pull requests

2 participants