mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 08:09:16 +02:00
Implement tag models
This commit is contained in:
parent
c170ee9394
commit
6dde4b73cd
28 changed files with 1034 additions and 141 deletions
|
@ -6,9 +6,7 @@ import PIL
|
|||
import random
|
||||
import shutil
|
||||
import tempfile
|
||||
import uuid
|
||||
|
||||
from faker.providers import internet as internet_provider
|
||||
import factory
|
||||
import pytest
|
||||
|
||||
|
@ -36,25 +34,6 @@ from funkwhale_api.music import licenses
|
|||
pytest_plugins = "aiohttp.pytest_plugin"
|
||||
|
||||
|
||||
class FunkwhaleProvider(internet_provider.Provider):
|
||||
"""
|
||||
Our own faker data generator, since built-in ones are sometimes
|
||||
not random enough
|
||||
"""
|
||||
|
||||
def federation_url(self, prefix=""):
|
||||
def path_generator():
|
||||
return "{}/{}".format(prefix, uuid.uuid4())
|
||||
|
||||
domain = self.domain_name()
|
||||
protocol = "https"
|
||||
path = path_generator()
|
||||
return "{}://{}/{}".format(protocol, domain, path)
|
||||
|
||||
|
||||
factory.Faker.add_provider(FunkwhaleProvider)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def queryset_equal_queries():
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue