Skip to content

Commit

Permalink
Corrige bug de apresentação de indicadores h5m5 quando periódico não …
Browse files Browse the repository at this point in the history
…esta selecionado
  • Loading branch information
fabiobatalha committed Aug 10, 2016
1 parent 51936dd commit b4bb2aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions analytics/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ def google_h5m5(self, issn, raw=False):

data = h5m5.get(issn)

if not data:
return None

if raw:
return data

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Babel==2.0
scieloh5m5==1.2.4
-e git+https://github.com/scieloorg/[email protected]#egg=xylose
-e git+https://github.com/scieloorg/[email protected]#egg=thriftpywrap
-e git+https://github.com/scieloorg/[email protected].0#egg=analytics
-e git+https://github.com/scieloorg/[email protected].1#egg=analytics
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name="analytics",
version='0.10.0',
version='0.10.1',
description="A analytics frontend for SciELO usage and publication statistics",
author="SciELO",
author_email="[email protected]",
Expand Down
8 changes: 8 additions & 0 deletions tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ def setUp(self):
self._path = os.path.dirname(os.path.realpath(__file__))
self._stats = controller.Stats('localhost:11600', 'localhost:11600', 'localhost:11600', 'localhost:11600')

def test_compute_h5m5_without_data(self):

data = None

result = self._stats.bibliometrics.google_h5m5('xxxx-xxxx')

self.assertEqual(result, None)

def test_compute_h5m5(self):

data = {
Expand Down

0 comments on commit b4bb2aa

Please sign in to comment.