chore: format files using isort (pre-commit)
This commit is contained in:
parent
20ed5f0d52
commit
cff619679b
226 changed files with 483 additions and 735 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.audio import filters
|
||||
from funkwhale_api.audio import models
|
||||
from funkwhale_api.audio import filters, models
|
||||
|
||||
|
||||
def test_channel_filter_subscribed_true(factories, mocker, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import uuid
|
|||
import feedparser
|
||||
import pytest
|
||||
import pytz
|
||||
|
||||
from django.templatetags.static import static
|
||||
from django.urls import reverse
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
import urllib.parse
|
||||
|
||||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import utils
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.audio import categories
|
||||
from funkwhale_api.audio import renderers
|
||||
from funkwhale_api.audio import serializers
|
||||
from funkwhale_api.audio import views
|
||||
from funkwhale_api.common import locales
|
||||
from funkwhale_api.common import utils
|
||||
from funkwhale_api.audio import categories, renderers, serializers, views
|
||||
from funkwhale_api.common import locales, utils
|
||||
|
||||
|
||||
def test_channel_create(logged_in_api_client):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import pytest
|
||||
from channels.testing import WebsocketCommunicator
|
||||
|
||||
from funkwhale_api.common.consumers import JsonAuthConsumer
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from click.testing import CliRunner
|
||||
|
||||
from funkwhale_api.cli import main
|
||||
from funkwhale_api.cli import library
|
||||
from funkwhale_api.cli import users
|
||||
from funkwhale_api.cli import library, main, users
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.core.management import call_command
|
||||
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import pytest
|
||||
|
||||
from rest_framework import viewsets
|
||||
|
||||
from funkwhale_api.common import decorators
|
||||
from funkwhale_api.common import models
|
||||
from funkwhale_api.common import mutations
|
||||
from funkwhale_api.common import serializers
|
||||
from funkwhale_api.common import signals
|
||||
from funkwhale_api.common import tasks
|
||||
from funkwhale_api.music import models as music_models
|
||||
from funkwhale_api.common import (
|
||||
decorators,
|
||||
models,
|
||||
mutations,
|
||||
serializers,
|
||||
signals,
|
||||
tasks,
|
||||
)
|
||||
from funkwhale_api.music import licenses
|
||||
from funkwhale_api.music import models as music_models
|
||||
|
||||
|
||||
class V(viewsets.ModelViewSet):
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
import html
|
||||
import time
|
||||
|
||||
import pytest
|
||||
from django.http import HttpResponse
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import middleware, throttling, utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
from funkwhale_api.common import middleware
|
||||
from funkwhale_api.common import throttling
|
||||
from funkwhale_api.common import utils
|
||||
|
||||
|
||||
def test_spa_fallback_middleware_no_404(mocker):
|
||||
get_response = mocker.Mock()
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import pytest
|
||||
from rest_framework import serializers
|
||||
|
||||
from funkwhale_api.common import mutations
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mutations_registry():
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from dynamic_preferences import types
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from funkwhale_api.common import preferences as common_preferences
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from django.db.models import Q
|
||||
from django import forms
|
||||
from django.db.models import Q
|
||||
|
||||
from funkwhale_api.common import search
|
||||
from funkwhale_api.music import models as music_models
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
import os
|
||||
import PIL
|
||||
|
||||
import django_filters
|
||||
import PIL
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
from django.urls import reverse
|
||||
|
||||
import django_filters
|
||||
|
||||
from funkwhale_api.common import serializers
|
||||
from funkwhale_api.common import utils
|
||||
from funkwhale_api.users import models
|
||||
from funkwhale_api.common import serializers, utils
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.users import models
|
||||
|
||||
|
||||
class TestActionFilterSet(django_filters.FilterSet):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import pytest
|
||||
import datetime
|
||||
|
||||
from funkwhale_api.common import models
|
||||
from funkwhale_api.common import serializers
|
||||
from funkwhale_api.common import signals
|
||||
from funkwhale_api.common import tasks
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import models, serializers, signals, tasks
|
||||
|
||||
|
||||
def test_apply_migration(factories, mocker):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import time
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import throttling
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import io
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import utils
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import io
|
||||
import pytest
|
||||
|
||||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import serializers
|
||||
from funkwhale_api.common import signals
|
||||
from funkwhale_api.common import tasks
|
||||
from funkwhale_api.common import throttling
|
||||
from funkwhale_api.common import utils
|
||||
from funkwhale_api.common import serializers, signals, tasks, throttling, utils
|
||||
|
||||
|
||||
def test_can_detail_mutation(logged_in_api_client, factories):
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
import contextlib
|
||||
import io
|
||||
import os
|
||||
import PIL
|
||||
import random
|
||||
import shutil
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
import factory
|
||||
import PIL
|
||||
import pytest
|
||||
|
||||
from django.core.management import call_command
|
||||
from aioresponses import aioresponses
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.core.cache import cache as django_cache, caches
|
||||
from django.core.cache import cache as django_cache
|
||||
from django.core.cache import caches
|
||||
from django.core.files import uploadedfile
|
||||
from django.utils import timezone
|
||||
from django.test import client
|
||||
from django.core.management import call_command
|
||||
from django.db import connection
|
||||
from django.db.migrations.executor import MigrationExecutor
|
||||
from django.db.models import QuerySet
|
||||
|
||||
from aioresponses import aioresponses
|
||||
from django.test import client
|
||||
from django.utils import timezone
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
from rest_framework.test import APIClient, APIRequestFactory
|
||||
|
||||
|
|
@ -74,6 +73,7 @@ def queryset_equal_list():
|
|||
@pytest.fixture(scope="session", autouse=True)
|
||||
def factories_autodiscover():
|
||||
from django.apps import apps
|
||||
|
||||
from funkwhale_api import factories
|
||||
|
||||
app_names = [app.name for app in apps.app_configs.values()]
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import json
|
|||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.favorites.models import TrackFavorite
|
||||
from funkwhale_api.favorites import serializers
|
||||
from funkwhale_api.favorites.models import TrackFavorite
|
||||
|
||||
|
||||
def test_user_can_add_favorite(factories):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.favorites import filters
|
||||
from funkwhale_api.favorites import models
|
||||
from funkwhale_api.favorites import filters, models
|
||||
|
||||
|
||||
def test_track_favorite_filter_track_artist(factories, mocker, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.favorites import serializers
|
||||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.music import serializers as music_serializers
|
||||
from funkwhale_api.users import serializers as users_serializers
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
from django.db.models import Q
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.federation import (
|
||||
activity,
|
||||
models,
|
||||
api_serializers,
|
||||
models,
|
||||
serializers,
|
||||
tasks,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
from funkwhale_api.federation import fields
|
||||
from funkwhale_api.federation import filters
|
||||
from funkwhale_api.federation import models
|
||||
from funkwhale_api.federation import fields, filters, models
|
||||
|
||||
|
||||
def test_inbox_item_filter_before(factories):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.common import serializers as common_serializers
|
||||
from funkwhale_api.federation import api_serializers
|
||||
from funkwhale_api.federation import serializers
|
||||
from funkwhale_api.federation import api_serializers, serializers
|
||||
from funkwhale_api.users import serializers as users_serializers
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
import datetime
|
||||
|
||||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.federation import api_serializers
|
||||
from funkwhale_api.federation import serializers
|
||||
from funkwhale_api.federation import tasks
|
||||
from funkwhale_api.federation import views
|
||||
from funkwhale_api.federation import api_serializers, serializers, tasks, views
|
||||
|
||||
|
||||
def test_user_can_list_their_library_follows(factories, logged_in_api_client):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.federation import authentication, exceptions, keys, jsonld
|
||||
from funkwhale_api.federation import authentication, exceptions, jsonld, keys
|
||||
|
||||
|
||||
def test_authenticate(factories, mocker, api_request):
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
from rest_framework import viewsets
|
||||
|
||||
from funkwhale_api.federation import api_serializers, decorators, models, tasks
|
||||
from funkwhale_api.music import models as music_models
|
||||
|
||||
from funkwhale_api.federation import api_serializers
|
||||
from funkwhale_api.federation import decorators
|
||||
from funkwhale_api.federation import models
|
||||
from funkwhale_api.federation import tasks
|
||||
|
||||
|
||||
class V(viewsets.ModelViewSet):
|
||||
queryset = music_models.Track.objects.all()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import pytest
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from funkwhale_api.federation import contexts
|
||||
from funkwhale_api.federation import jsonld
|
||||
from funkwhale_api.federation import contexts, jsonld
|
||||
|
||||
|
||||
def test_expand_no_external_request():
|
||||
|
|
|
|||
|
|
@ -1,19 +1,21 @@
|
|||
import io
|
||||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
from django.core.paginator import Paginator
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.federation import actors
|
||||
from funkwhale_api.federation import contexts
|
||||
from funkwhale_api.federation import keys
|
||||
from funkwhale_api.federation import jsonld
|
||||
from funkwhale_api.federation import models
|
||||
from funkwhale_api.federation import serializers
|
||||
from funkwhale_api.federation import utils
|
||||
from funkwhale_api.federation import (
|
||||
actors,
|
||||
contexts,
|
||||
jsonld,
|
||||
keys,
|
||||
models,
|
||||
serializers,
|
||||
utils,
|
||||
)
|
||||
from funkwhale_api.moderation import serializers as moderation_serializers
|
||||
from funkwhale_api.music import licenses
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import cryptography.exceptions
|
||||
import datetime
|
||||
from django.utils.http import http_date
|
||||
from django import forms
|
||||
|
||||
import cryptography.exceptions
|
||||
import pytest
|
||||
from django import forms
|
||||
from django.utils.http import http_date
|
||||
|
||||
from funkwhale_api.federation import keys, signing
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
import datetime
|
||||
import os
|
||||
import pathlib
|
||||
import pytest
|
||||
|
||||
import pytest
|
||||
from django.utils import timezone
|
||||
|
||||
from funkwhale_api.federation import jsonld
|
||||
from funkwhale_api.federation import models
|
||||
from funkwhale_api.federation import serializers
|
||||
from funkwhale_api.federation import tasks
|
||||
from funkwhale_api.federation import utils
|
||||
from funkwhale_api.federation import jsonld, models, serializers, tasks, utils
|
||||
|
||||
|
||||
def test_clean_federation_music_cache_if_no_listen(preferences, factories):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.federation import routes
|
||||
from funkwhale_api.federation import serializers
|
||||
from funkwhale_api.federation import routes, serializers
|
||||
|
||||
|
||||
def test_pleroma_actor_from_ap_with_tags(factories):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from rest_framework import serializers
|
||||
import pytest
|
||||
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from rest_framework import serializers
|
||||
|
||||
from funkwhale_api.federation import exceptions, utils
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,9 @@ from django.core.paginator import Paginator
|
|||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import utils
|
||||
|
||||
from funkwhale_api.federation import (
|
||||
actors,
|
||||
serializers,
|
||||
webfinger,
|
||||
utils as federation_utils,
|
||||
)
|
||||
from funkwhale_api.federation import actors, serializers
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.federation import webfinger
|
||||
|
||||
|
||||
def test_authenticate_allows_anonymous_actor_fetch_when_allow_list_enabled(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.history import filters
|
||||
from funkwhale_api.history import models
|
||||
from funkwhale_api.history import filters, models
|
||||
|
||||
|
||||
def test_listening_filter_track_artist(factories, mocker, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
from collections import OrderedDict
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api import __version__ as api_version
|
||||
from funkwhale_api.music.utils import SUPPORTED_EXTENSIONS
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
|
||||
def test_nodeinfo_default(api_client):
|
||||
url = reverse("api:v1:instance:nodeinfo-2.0")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.moderation import mrf
|
||||
from funkwhale_api.moderation import mrf_policies
|
||||
from funkwhale_api.moderation import mrf, mrf_policies
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import preferences as common_preferences
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
import json
|
||||
import pytest
|
||||
import urllib.parse
|
||||
|
||||
import pytest
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.federation import models as federation_models
|
||||
from funkwhale_api.moderation import serializers
|
||||
from funkwhale_api.moderation import signals
|
||||
from funkwhale_api.moderation import serializers, signals
|
||||
|
||||
|
||||
def test_user_filter_serializer_repr(factories):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.federation import utils as federation_utils
|
||||
|
||||
from funkwhale_api.moderation import tasks
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.music import serializers
|
||||
from funkwhale_api.music import signals
|
||||
from funkwhale_api.music import serializers, signals
|
||||
|
||||
|
||||
def test_get_track_activity_url_mbid(factories):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.music.management.commands import check_inplace_files
|
||||
from funkwhale_api.music.management.commands import fix_uploads
|
||||
from funkwhale_api.music.management.commands import prune_library
|
||||
from funkwhale_api.music.management.commands import (
|
||||
check_inplace_files,
|
||||
fix_uploads,
|
||||
prune_library,
|
||||
)
|
||||
|
||||
DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.music import filters
|
||||
from funkwhale_api.music import models
|
||||
from funkwhale_api.music import filters, models
|
||||
|
||||
|
||||
def test_album_filter_hidden(factories, mocker, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
import os
|
||||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
from django import forms
|
||||
|
||||
from funkwhale_api.music import importers
|
||||
from funkwhale_api.music import models
|
||||
from funkwhale_api.music import importers, models
|
||||
|
||||
DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import json
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.music import models
|
||||
from funkwhale_api.music import licenses
|
||||
from funkwhale_api.music import licenses, models
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import datetime
|
||||
import os
|
||||
import uuid
|
||||
import pytest
|
||||
|
||||
import mutagen.oggtheora
|
||||
import mutagen.oggvorbis
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.music import metadata
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from django.utils import timezone
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.music import importers, models, tasks
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.music import importers, models, tasks
|
||||
|
||||
DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
import datetime
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import serializers as common_serializers
|
||||
from funkwhale_api.music import licenses
|
||||
from funkwhale_api.music import mutations
|
||||
|
||||
from funkwhale_api.music import licenses, mutations
|
||||
from funkwhale_api.tags import models as tags_models
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.common import serializers as common_serializers
|
||||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.music import licenses
|
||||
from funkwhale_api.music import models
|
||||
from funkwhale_api.music import serializers
|
||||
from funkwhale_api.music import tasks
|
||||
from funkwhale_api.music import licenses, models, serializers, tasks
|
||||
|
||||
|
||||
def test_license_serializer():
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import datetime
|
||||
import os
|
||||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
from django.core.paginator import Paginator
|
||||
from django.utils import timezone
|
||||
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.federation import jsonld
|
||||
from funkwhale_api.federation import serializers as federation_serializers
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.music import licenses, metadata, models, signals, tasks
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.db import connection
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import os
|
||||
import pathlib
|
||||
import pytest
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
|
||||
from funkwhale_api.music import utils
|
||||
|
||||
DATA_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import datetime
|
||||
import io
|
||||
import magic
|
||||
import os
|
||||
import pathlib
|
||||
import urllib.parse
|
||||
import uuid
|
||||
|
||||
import magic
|
||||
import pytest
|
||||
from django.db.models import Prefetch
|
||||
from django.urls import reverse
|
||||
|
|
@ -13,8 +13,8 @@ from django.utils import timezone
|
|||
|
||||
from funkwhale_api.common import utils
|
||||
from funkwhale_api.federation import api_serializers as federation_api_serializers
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.federation import tasks as federation_tasks
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.music import licenses, models, serializers, tasks, views
|
||||
from funkwhale_api.users import authentication as users_authentication
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.playlists import filters
|
||||
from funkwhale_api.playlists import models
|
||||
from funkwhale_api.playlists import filters, models
|
||||
|
||||
|
||||
def test_playlist_filter_track(factories, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@ import os
|
|||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from funkwhale_api.common import models
|
||||
from config import plugins
|
||||
from funkwhale_api.common import models
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.music.serializers import TrackSerializer
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import json
|
||||
import pytest
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
import funkwhale_api
|
||||
import pytest
|
||||
|
||||
import funkwhale_api
|
||||
from funkwhale_api.subsonic import renderers
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import datetime
|
||||
|
||||
from django.db.models.aggregates import Count
|
||||
import pytest
|
||||
from django.db.models.aggregates import Count
|
||||
|
||||
from funkwhale_api.music import models as music_models
|
||||
from funkwhale_api.subsonic import serializers
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from funkwhale_api.tags import filters
|
||||
from funkwhale_api.tags import models
|
||||
from funkwhale_api.tags import filters, models
|
||||
|
||||
|
||||
def test_filter_search_tag(factories, queryset_equal_list):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import pytest
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.users.oauth import scopes
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django import forms
|
||||
|
||||
from funkwhale_api.users import models
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
|
||||
from funkwhale_api.users.oauth import scopes
|
||||
from funkwhale_api.users.oauth import permissions
|
||||
from funkwhale_api.users.oauth import permissions, scopes
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from oauth2_provider import models
|
||||
|
||||
from funkwhale_api.users.oauth import tasks
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import json
|
||||
import pytest
|
||||
|
||||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.users import models
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import pytest
|
||||
|
||||
from django.core import signing
|
||||
|
||||
from funkwhale_api.users import authentication
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
from django.contrib.auth import get_backends
|
||||
|
||||
from django_auth_ldap import backend
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import datetime
|
||||
import pytest
|
||||
|
||||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.users import models
|
||||
from funkwhale_api.federation import utils as federation_utils
|
||||
from funkwhale_api.users import models
|
||||
|
||||
|
||||
def test__str__(factories):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import pytest
|
||||
from django.urls import reverse
|
||||
|
||||
from django.test import Client
|
||||
from django.urls import reverse
|
||||
|
||||
from funkwhale_api.common import serializers as common_serializers
|
||||
from funkwhale_api.common import utils as common_utils
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import datetime
|
||||
|
||||
from rest_framework import fields as rest_fields
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue