Skip to content

Remove pytest warnings #5346

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

Merged
merged 4 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ def pytest_configure(config):
def settings_modification(settings):
settings.CELERY_ALWAYS_EAGER = True


@pytest.fixture
def api_client():
return APIClient()


@pytest.fixture(scope="class")
def url_scheme(request):
request.cls.url_scheme = request.config.option.url_scheme
3 changes: 2 additions & 1 deletion readthedocs/rtd_tests/tests/test_core_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
from readthedocs.projects.models import Project


@pytest.mark.usefixtures("url_scheme")
@override_settings(USE_SUBDOMAIN=False, PRODUCTION_DOMAIN='readthedocs.org')
class CoreTagsTests(TestCase):
fixtures = ['eric', 'test_data']

def setUp(self):
url_base = '{scheme}://{domain}/docs/pip{{version}}'.format(
scheme=pytest.config.option.url_scheme,
scheme=self.url_scheme,
domain=settings.PRODUCTION_DOMAIN,
)

Expand Down