Commit 2f473d75 authored by Eliot Berriot's avatar Eliot Berriot 💬

Added requests-mock dependency and fixture

parent 471d1fe9
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment