Skip to content
Snippets Groups Projects
Verified Commit 2f473d75 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added requests-mock dependency and fixture

parent 471d1fe9
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,4 @@ pytest-mock
pytest-sugar
pytest-xdist
pytest-cov
requests-mock
......@@ -2,6 +2,7 @@ import factory
import tempfile
import shutil
import pytest
import requests_mock
from django.contrib.auth.models import AnonymousUser
from django.core.cache import cache as django_cache
......@@ -148,3 +149,9 @@ def media_root(settings):
settings.MEDIA_ROOT = tmp_dir
yield settings.MEDIA_ROOT
shutil.rmtree(tmp_dir)
@pytest.fixture
def r_mock():
with requests_mock.mock() as m:
yield m
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment