mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 11:19:15 +02:00
Blacked the code
This commit is contained in:
parent
b6fc0051fa
commit
62ca3bd736
279 changed files with 8861 additions and 9527 deletions
|
@ -7,11 +7,16 @@ from funkwhale_api.common import fields
|
|||
from funkwhale_api.users.factories import UserFactory
|
||||
|
||||
|
||||
@pytest.mark.parametrize('user,expected', [
|
||||
(AnonymousUser(), Q(privacy_level='everyone')),
|
||||
(UserFactory.build(pk=1),
|
||||
Q(privacy_level__in=['followers', 'instance', 'everyone'])),
|
||||
])
|
||||
def test_privacy_level_query(user,expected):
|
||||
@pytest.mark.parametrize(
|
||||
"user,expected",
|
||||
[
|
||||
(AnonymousUser(), Q(privacy_level="everyone")),
|
||||
(
|
||||
UserFactory.build(pk=1),
|
||||
Q(privacy_level__in=["followers", "instance", "everyone"]),
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_privacy_level_query(user, expected):
|
||||
query = fields.privacy_level_query(user)
|
||||
assert query == expected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue