mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 21:09:16 +02:00
Import trust source
This commit is contained in:
parent
ad7e6a97e5
commit
1bee3a4675
14 changed files with 872 additions and 429 deletions
|
@ -11,7 +11,7 @@ import uuid
|
|||
from faker.providers import internet as internet_provider
|
||||
import factory
|
||||
import pytest
|
||||
import requests_mock
|
||||
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.core.cache import cache as django_cache
|
||||
from django.core.files import uploadedfile
|
||||
|
@ -271,14 +271,13 @@ def media_root(settings):
|
|||
shutil.rmtree(tmp_dir)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def r_mock():
|
||||
@pytest.fixture(autouse=True)
|
||||
def r_mock(requests_mock):
|
||||
"""
|
||||
Returns a requests_mock.mock() object you can use to mock HTTP calls made
|
||||
using python-requests
|
||||
"""
|
||||
with requests_mock.mock() as m:
|
||||
yield m
|
||||
yield requests_mock
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue