Skip to content

Commit bdb4aa5

Browse files
authored
Merge pull request readthedocs#5346 from saadmk11/remove-pytest-warnings
Remove pytest warnings
2 parents 0917fbd + 68836e7 commit bdb4aa5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

conftest.py

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ def pytest_configure(config):
4747
def settings_modification(settings):
4848
settings.CELERY_ALWAYS_EAGER = True
4949

50+
5051
@pytest.fixture
5152
def api_client():
5253
return APIClient()
54+
55+
56+
@pytest.fixture(scope="class")
57+
def url_scheme(request):
58+
request.cls.url_scheme = request.config.option.url_scheme

readthedocs/rtd_tests/tests/test_core_tags.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
from readthedocs.projects.models import Project
1010

1111

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

1617
def setUp(self):
1718
url_base = '{scheme}://{domain}/docs/pip{{version}}'.format(
18-
scheme=pytest.config.option.url_scheme,
19+
scheme=self.url_scheme,
1920
domain=settings.PRODUCTION_DOMAIN,
2021
)
2122

0 commit comments

Comments
 (0)