mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 23:08:25 +02:00
Added requests-mock dependency and fixture
This commit is contained in:
parent
471d1fe9d7
commit
2f473d7570
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue