Skip to content

Commit

Permalink
Merge pull request #99 from ehenneken/bug_fix_highres
Browse files Browse the repository at this point in the history
bug fix for output
  • Loading branch information
ehenneken committed Feb 19, 2021
2 parents 116f5a9 + 34b0a06 commit e138dfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion graphics_service/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_graphics(bibcode):
'figure_label':'',
'figure_caption':'',
'figure_type':'',
'images':[{'thumbnail':t}]
'images':[{'thumbnail':t[0], 'highres':t[1]}]
}
output['figures'].append(fig_data)
if source in current_app.config.get('GRAPHICS_EXTSOURCES'):
Expand Down
5 changes: 2 additions & 3 deletions graphics_service/tests/test_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from datetime import datetime

def get_testdata(figures = [], thumbnails=[], source='TEST'):
thumbs = [f['images'][0].get('thumbnail','') for f in figures]
thumbs = [(f['images'][0].get('thumbnail',''),f['images'][0].get('thumnail','')) for f in figures]
g = GraphicsModel(
bibcode='9999BBBBBVVVVQPPPPI',
doi='DOI',
Expand All @@ -33,8 +33,7 @@ def get_testdata(figures = [], thumbnails=[], source='TEST'):
return results

class TestExpectedResults(TestCase):

figure_data = [{'images': [{'thumbnail': 'http://fg1_thumb_url'}],
figure_data = [{'images': [{'thumbnail': 'http://fg1_thumb_url', 'highres':''}],
'figure_caption': '',
'figure_label': '',
'figure_type': u''}]
Expand Down

0 comments on commit e138dfe

Please sign in to comment.