Skip to content

Commit

Permalink
Merge pull request #5346 from saadmk11/remove-pytest-warnings
Browse files Browse the repository at this point in the history
Remove pytest warnings
  • Loading branch information
stsewd authored Mar 5, 2019
2 parents 0917fbd + 68836e7 commit bdb4aa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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 @@ -9,13 +9,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

0 comments on commit bdb4aa5

Please sign in to comment.