Skip to content

Commit 63cd33a

Browse files
committed
Account for one version of mandate be cached in tests
1 parent 9813d39 commit 63cd33a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test_module.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,16 @@ def test_search_author_single_author(self):
212212
sum(pub.get('public_access', None) is True for pub in author['publications']))
213213
self.assertEqual(author['public_access']['not_available'],
214214
sum(pub.get('public_access', None) is False for pub in author['publications']))
215-
pub = author['publications'][2]
215+
pub = author['publications'][1]
216216
self.assertEqual(pub['author_pub_id'], u'4bahYMkAAAAJ:LI9QrySNdTsC')
217217
self.assertTrue('5738786554683183717' in pub['cites_id'])
218218
scholarly.fill(pub)
219+
self.assertEqual(pub['pub_url'], "https://dl.acm.org/doi/abs/10.1145/3130800.3130815")
219220
mandate = Mandate(agency="US National Science Foundation", effective_date="2016/1", embargo="12 months",
220221
url_policy="https://www.nsf.gov/pubs/2015/nsf15052/nsf15052.pdf",
221222
url_policy_cached="/mandates/nsf-2021-02-13.pdf",
222223
grant="BCS-1354029")
223-
self.assertIn(mandate, pub['mandates'])
224+
self.assertIn(mandate['agency'], [_mandate['agency'] for _mandate in pub['mandates']])
224225
# Trigger the pprint method, but suppress the output
225226
with self.suppress_stdout():
226227
scholarly.pprint(author)

0 commit comments

Comments
 (0)