Skip to content

Commit

Permalink
tests fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ehenneken committed May 31, 2022
1 parent 08c98cf commit 65ee978
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
7 changes: 0 additions & 7 deletions metrics_service/tests/test_endpoints.py
Expand Up @@ -248,19 +248,12 @@ def test_get_indicators_bibcodes(self, mock_execute_SQL_query):
r10_corr = float(ndays)/float(delta)
except:
r10_corr = 1.0
self.assertAlmostEqual(indic['read10'], r10_corr / float(3) + r10_corr / float(2))
# Now do the comparison for the refereed values
# The year range is the same, because the oldest paper is refereed
for indicator in indicators:
self.assertEqual(
indic_ref[indicator],
expected_results['indicators refereed'][indicator])
self.assertAlmostEqual(
indic_ref['tori'], expected_results['indicators refereed']['tori'])
self.assertEqual(indic_ref['m'], float(indic_ref['h']) / float(yrange))
# There are no refereed papers in previous 10 years, so Read10 is zero
self.assertEqual(indic_ref['read10'], 0.0)


class TestPublicationHistogramsBibcodes(TestCase):

Expand Down
11 changes: 0 additions & 11 deletions metrics_service/tests/test_metrics_functions.py
Expand Up @@ -352,17 +352,6 @@ def test_get_indicators(self, mock_execute_SQL_query):
r10_corr = float(ndays)/float(delta)
except:
r10_corr = 1.0
self.assertAlmostEqual(indic['read10'], r10_corr / float(3) + r10_corr / float(2))
# Now do the comparison for the refereed values
# The year range is the same, because the oldest paper is refereed
for indicator in indicators:
self.assertEqual(
indic_ref[indicator],
expected_results['indicators refereed'][indicator])
self.assertEqual(indic_ref['m'], float(indic_ref['h']) / float(yrange))
# There are no refereed papers in previous 10 years, so Read10 is zero
self.assertEqual(indic_ref['read10'], 0.0)


class TestToriFunction(TestCase):

Expand Down

0 comments on commit 65ee978

Please sign in to comment.