Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale_OLD
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jovuit
funkwhale_OLD
Commits
a87a2837
Verified
Commit
a87a2837
authored
7 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed failing tests
parent
d310628c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/tests/common/test_fields.py
+1
-1
1 addition, 1 deletion
api/tests/common/test_fields.py
api/tests/conftest.py
+8
-0
8 additions, 0 deletions
api/tests/conftest.py
with
9 additions
and
1 deletion
api/tests/common/test_fields.py
+
1
−
1
View file @
a87a2837
...
...
@@ -10,7 +10,7 @@ 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
=
[
'
me
'
,
'
followers
'
,
'
instance
'
,
'
everyone
'
])),
Q
(
privacy_level__in
=
[
'
followers
'
,
'
instance
'
,
'
everyone
'
])),
])
def
test_privacy_level_query
(
user
,
expected
):
query
=
fields
.
privacy_level_query
(
user
)
...
...
This diff is collapsed.
Click to expand it.
api/tests/conftest.py
+
8
−
0
View file @
a87a2837
...
...
@@ -132,3 +132,11 @@ def activity_registry():
@pytest.fixture
def
activity_muted
(
activity_registry
,
mocker
):
yield
mocker
.
patch
.
object
(
record
,
'
send
'
)
@pytest.fixture
(
autouse
=
True
)
def
media_root
(
settings
):
tmp_dir
=
tempfile
.
mkdtemp
()
settings
.
MEDIA_ROOT
=
tmp_dir
yield
settings
.
MEDIA_ROOT
shutil
.
rmtree
(
tmp_dir
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment