Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

Commit

Permalink
Add folder_name to coop missions
Browse files Browse the repository at this point in the history
  • Loading branch information
micheljung committed Sep 5, 2016
1 parent f5f03bb commit 3bfc84e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/coop.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'thumbnail_url_small': "REPLACE(REPLACE(filename, '.zip', '.png'), 'missions/', '')",
# thumbnail_url_large will be URL encoded and made absolute in enricher
'thumbnail_url_large': "REPLACE(REPLACE(filename, '.zip', '.png'), 'missions/', '')",
'folder_name': "SUBSTRING(filename, LOCATE('/', filename)+1, LOCATE('.zip', filename)-6)"
}

MAX_PAGE_SIZE = 1000
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pillow == 3.3.1
coveralls
cryptography == 1.5
geoip2 == 2.4.0
git+https://github.com/FAForever/faftools.git@087e412da6d8c4c1a774c3222287eaedfa3b6361#egg=faftools
git+https://github.com/FAForever/faftools.git@b0acad13d4bff130f8363b18481e36eeed960efc#egg=faftools
marshmallow == 2.9.1
marshmallow_jsonapi == 0.8.0
peewee >= 2.4.2
Expand Down
1 change: 1 addition & 0 deletions tests/unit_tests/test_coop.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def test_coop_missions(test_client, maps):
assert 'download_url' in item['attributes']
assert 'thumbnail_url_small' in item['attributes']
assert 'thumbnail_url_large' in item['attributes']
assert 'folder_name' in item['attributes']


def test_coop_missions_fields(test_client, maps):
Expand Down

0 comments on commit 3bfc84e

Please sign in to comment.