Skip to content

Commit 13e4c84

Browse files
author
Valentin
committed
Make CI pass
1 parent dc1e439 commit 13e4c84

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/python.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ jobs:
88

99
steps:
1010
- uses: actions/checkout@v2
11-
- name: Set up Python 3.x
11+
- name: Set up Python 3.8
1212
uses: actions/setup-python@v2
1313
with:
14-
python-version: '3.x'
14+
python-version: '3.8'
1515
- name: Install dependencies
1616
run: |
17+
python -m pip install -U setuptools
1718
python -m pip install --upgrade pip
1819
pip install .[tests]
1920
- name: Run linting

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
'tests': {
3333
'flake8==3.8.4',
3434
'pytest==5.4.3',
35+
'pytest-flask==1.2.0',
3536
'pytest-mock==3.1.1',
3637
'pyfakefs==4.0.2',
3738
'responses==0.10.15',

statify/webserver/webserver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import functools
21
from datetime import datetime
32

43
import flask
@@ -33,14 +32,14 @@ def song_page(spotify_id):
3332
@app.route('/api/listenings/<spotify_id>')
3433
def listenings_endpoint(spotify_id):
3534
listenings = flask.g.db_client.select_listenings_by_spotify_id(spotify_id)
36-
return flask.jsonify([listening_resource(l) for l in listenings])
35+
return flask.jsonify([listening_resource(lisng) for lisng in listenings])
3736

3837

3938
@app.route('/api/autocomplete')
4039
def autocomplete_endpoint():
4140
query = flask.request.args['query']
4241
words = [w.lower() for w in query.split()]
43-
42+
4443
results = flask.g.db_client.search_songs(words)
4544

4645
results.sort(

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def song_factory(database, **data):
265265
'artists_names': 'The Supremes'
266266
}
267267
song_data.update(data)
268-
song = Song(**song_data)
268+
song = Song(**song_data)
269269
database.insert(song)
270270
return song
271271

tests/webserver/test_listenings_endpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
def test_listenings_endpoint(client, in_memory_database):
77
song = utils.song_factory(in_memory_database)
8-
listenings = [
8+
[
99
utils.listening_factory(
1010
in_memory_database, song=song, played_at=played_at
1111
)

0 commit comments

Comments
 (0)