From f99b68aca1ac2cdb4c06207fd43310bd1a741cf7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 23 Jan 2019 14:24:47 -0800 Subject: improve changelog tests --- python/tests/import_orcid.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python/tests/import_orcid.py') diff --git a/python/tests/import_orcid.py b/python/tests/import_orcid.py index 9e898521..4055091d 100644 --- a/python/tests/import_orcid.py +++ b/python/tests/import_orcid.py @@ -16,13 +16,14 @@ def test_orcid_importer_badid(orcid_importer): # TODO: use API to check that entities actually created... def test_orcid_importer(orcid_importer): + last_index = orcid_importer.api.get_changelog(limit=1)[0].index with open('tests/files/0000-0001-8254-7103.json', 'r') as f: orcid_importer.bezerk_mode = True JsonLinePusher(orcid_importer, f).run() # fetch most recent editgroup - changes = orcid_importer.api.get_changelog(limit=1) - eg = changes[0].editgroup + change = orcid_importer.api.get_changelog_entry(index=last_index+1) + eg = change.editgroup assert eg.description assert "orcid" in eg.description.lower() assert eg.extra['git_rev'] -- cgit v1.2.3