Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julien Veyssier
funkwhale
Commits
77c0b2b1
Verified
Commit
77c0b2b1
authored
Jun 10, 2018
by
Eliot Berriot
Browse files
See #297: added black as a local dependency, more verbose check in CI
parent
d17ceec1
Changes
4
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
77c0b2b1
...
...
@@ -20,7 +20,7 @@ black:
before_script
:
-
pip install black
script
:
-
black --check api/
-
black --check
--diff
api/
flake8
:
image
:
python:3.6
...
...
@@ -30,7 +30,7 @@ flake8:
before_script
:
-
pip install flake8
script
:
-
flake8 api
-
flake8
-v
api
cache
:
key
:
"
$CI_PROJECT_ID__flake8_pip_cache"
paths
:
...
...
api/requirements/local.txt
View file @
77c0b2b1
...
...
@@ -9,3 +9,4 @@ django-debug-toolbar>=1.9,<1.10
# improved REPL
ipdb==0.8.1
black
api/tests/music/test_activity.py
View file @
77c0b2b1
def
test_get_track_activity_url_mbid
(
factories
):
track
=
factories
[
"music.Track"
]()
expected
=
"https://musicbrainz.org/recording/{}"
.
format
(
track
.
mbid
)
...
...
api/tests/subsonic/test_views.py
View file @
77c0b2b1
...
...
@@ -163,9 +163,7 @@ def test_unstar(f, db, logged_in_api_client, factories):
url
=
reverse
(
"api:subsonic-unstar"
)
assert
url
.
endswith
(
"unstar"
)
is
True
track
=
factories
[
"music.Track"
]()
factories
[
"favorites.TrackFavorite"
](
track
=
track
,
user
=
logged_in_api_client
.
user
)
factories
[
"favorites.TrackFavorite"
](
track
=
track
,
user
=
logged_in_api_client
.
user
)
response
=
logged_in_api_client
.
get
(
url
,
{
"f"
:
f
,
"id"
:
track
.
pk
})
assert
response
.
status_code
==
200
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment