First round of improvements to channel management:
- use modals - less proeminent button - field styling/labels
This commit is contained in:
parent
f8675c6080
commit
e59cc33378
103 changed files with 3201 additions and 447 deletions
|
|
@ -78,12 +78,21 @@ def test_actor_get_quota(factories):
|
|||
audio_file__data=b"aaaa",
|
||||
)
|
||||
|
||||
# this one is in a channel
|
||||
channel = factories["audio.Channel"](attributed_to=library.actor)
|
||||
factories["music.Upload"](
|
||||
library=channel.library,
|
||||
import_status="finished",
|
||||
audio_file__from_path=None,
|
||||
audio_file__data=b"aaaaa",
|
||||
)
|
||||
|
||||
expected = {
|
||||
"total": 19,
|
||||
"total": 24,
|
||||
"pending": 1,
|
||||
"skipped": 2,
|
||||
"errored": 3,
|
||||
"finished": 8,
|
||||
"finished": 13,
|
||||
"draft": 5,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,41 @@ def test_inbox_follow_library_autoapprove(factories, mocker):
|
|||
)
|
||||
|
||||
|
||||
def test_inbox_follow_channel_autoapprove(factories, mocker):
|
||||
mocked_outbox_dispatch = mocker.patch(
|
||||
"funkwhale_api.federation.activity.OutboxRouter.dispatch"
|
||||
)
|
||||
|
||||
local_actor = factories["users.User"]().create_actor()
|
||||
remote_actor = factories["federation.Actor"]()
|
||||
channel = factories["audio.Channel"](attributed_to=local_actor)
|
||||
ii = factories["federation.InboxItem"](actor=channel.actor)
|
||||
|
||||
payload = {
|
||||
"type": "Follow",
|
||||
"id": "https://test.follow",
|
||||
"actor": remote_actor.fid,
|
||||
"object": channel.actor.fid,
|
||||
}
|
||||
|
||||
result = routes.inbox_follow(
|
||||
payload,
|
||||
context={"actor": remote_actor, "inbox_items": [ii], "raise_exception": True},
|
||||
)
|
||||
follow = channel.actor.received_follows.latest("id")
|
||||
|
||||
assert result["object"] == channel.actor
|
||||
assert result["related_object"] == follow
|
||||
|
||||
assert follow.fid == payload["id"]
|
||||
assert follow.actor == remote_actor
|
||||
assert follow.approved is True
|
||||
|
||||
mocked_outbox_dispatch.assert_called_once_with(
|
||||
{"type": "Accept"}, context={"follow": follow}
|
||||
)
|
||||
|
||||
|
||||
def test_inbox_follow_library_manual_approve(factories, mocker):
|
||||
mocked_outbox_dispatch = mocker.patch(
|
||||
"funkwhale_api.federation.activity.OutboxRouter.dispatch"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue