def test_une_valid(self): url = 'https://e-publications.une.edu.au/oaiprovider/' pid = 'une:18767' client = get_oai_client(url, prefix='mods') xml = get_oai_document_metadata(client, pid) assert xml.tag.startswith('{http://www.loc.gov/mods/') assert xml.tag.endswith('}mods')
def fetch_csl_data(api, prefix, pids): """Return mods collection containing records of each pid.""" client = get_oai_client(api, prefix) pubs = [] for pid in pids: pubs.append(get_oai_document_metadata(client, pid)) mods = create_mods_collection(pubs) return mods
def test_une_invalid(self): url = 'https://e-publications.une.edu.au/oaiprovider/' pid = 'une:-1' client = get_oai_client(url, prefix='mods') self.assertRaises(IdDoesNotExistError, get_oai_document_metadata, client, pid)