コード例 #1
0
 def test_do_not_add_bibtex_citation(self):
     converter = OrcidConverter(
         record=self.inspire_record,
         url_pattern='http://inspirehep.net/record/{recid}',
     )
     xml_root = converter.get_xml()
     top_level_tags = [
         etree.QName(node).localname for node in xml_root.getchildren()
     ]
     assert 'citation' not in top_level_tags
コード例 #2
0
ファイル: api.py プロジェクト: salmanmaq/inspire-next
def calculate_hash_for_record(record):
    """Generate hash for an ORCID-serialised HEP record

    Args:
        record (dict): HEP record

    Returns:
        string: hash of the record
    """
    orcid_rec = OrcidConverter(record, app.config['LEGACY_RECORD_URL_PATTERN'])
    return hash_xml_element(orcid_rec.get_xml())