Verified Commit 77c0b2b1 authored by Agate's avatar Agate 💬

See #297: added black as a local dependency, more verbose check in CI

parent d17ceec1
......@@ -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:
......
......@@ -9,3 +9,4 @@ django-debug-toolbar>=1.9,<1.10
# improved REPL
ipdb==0.8.1
black
def test_get_track_activity_url_mbid(factories):
track = factories["music.Track"]()
expected = "https://musicbrainz.org/recording/{}".format(track.mbid)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment