UI To manage artists, albums, tracks
This commit is contained in:
parent
ae390e5c1c
commit
b4731928fc
39 changed files with 2836 additions and 115 deletions
|
|
@ -1,3 +1,4 @@
|
|||
from funkwhale_api.federation import fields
|
||||
from funkwhale_api.federation import filters
|
||||
from funkwhale_api.federation import models
|
||||
|
||||
|
|
@ -7,3 +8,17 @@ def test_inbox_item_filter_before(factories):
|
|||
f = filters.InboxItemFilter({"before": 12}, queryset=models.InboxItem.objects.all())
|
||||
|
||||
assert str(f.qs.query) == str(expected.query)
|
||||
|
||||
|
||||
def test_domain_from_url_filter(factories):
|
||||
found = [
|
||||
factories["music.Artist"](fid="http://domain/test1"),
|
||||
factories["music.Artist"](fid="https://domain/test2"),
|
||||
]
|
||||
factories["music.Artist"](fid="http://domain2/test1")
|
||||
factories["music.Artist"](fid="https://otherdomain/test2")
|
||||
|
||||
queryset = found[0].__class__.objects.all().order_by("id")
|
||||
field = fields.DomainFromURLFilter()
|
||||
result = field.filter(queryset, "domain")
|
||||
assert list(result) == found
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue