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: ...@@ -20,7 +20,7 @@ black:
before_script: before_script:
- pip install black - pip install black
script: script:
- black --check api/ - black --check --diff api/
flake8: flake8:
image: python:3.6 image: python:3.6
...@@ -30,7 +30,7 @@ flake8: ...@@ -30,7 +30,7 @@ flake8:
before_script: before_script:
- pip install flake8 - pip install flake8
script: script:
- flake8 api - flake8 -v api
cache: cache:
key: "$CI_PROJECT_ID__flake8_pip_cache" key: "$CI_PROJECT_ID__flake8_pip_cache"
paths: paths:
......
...@@ -9,3 +9,4 @@ django-debug-toolbar>=1.9,<1.10 ...@@ -9,3 +9,4 @@ django-debug-toolbar>=1.9,<1.10
# improved REPL # improved REPL
ipdb==0.8.1 ipdb==0.8.1
black
def test_get_track_activity_url_mbid(factories): def test_get_track_activity_url_mbid(factories):
track = factories["music.Track"]() track = factories["music.Track"]()
expected = "https://musicbrainz.org/recording/{}".format(track.mbid) expected = "https://musicbrainz.org/recording/{}".format(track.mbid)
......
...@@ -163,9 +163,7 @@ def test_unstar(f, db, logged_in_api_client, factories): ...@@ -163,9 +163,7 @@ def test_unstar(f, db, logged_in_api_client, factories):
url = reverse("api:subsonic-unstar") url = reverse("api:subsonic-unstar")
assert url.endswith("unstar") is True assert url.endswith("unstar") is True
track = factories["music.Track"]() track = factories["music.Track"]()
factories["favorites.TrackFavorite"]( factories["favorites.TrackFavorite"](track=track, user=logged_in_api_client.user)
track=track, user=logged_in_api_client.user
)
response = logged_in_api_client.get(url, {"f": f, "id": track.pk}) response = logged_in_api_client.get(url, {"f": f, "id": track.pk})
assert response.status_code == 200 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