Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit eec5c1f9 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update basis/test_02_record_factory.

parent f724cb1f
# -*- coding: utf-8 -*-
"""test_02_record_factory
* Test tools to introspect the type of record.
......@@ -16,7 +15,6 @@ from invenio_tools.factory import (add_affiliation_keys,
get_conference_data)
from invenio_tools.inveniostore import InvenioStore
from invenio_tools.record import Record
from invenio_tools.recordconf import RecordConf
from invenio_tools.recordinst import RecordInst
from invenio_tools.recordpubli import RecordPubli
......@@ -27,9 +25,8 @@ from invenio_tools.recordthesis import RecordThesis
#
# Conference proceeding and talk
#
def test_get_conference_data():
""" check the different approach to get the conference data
using the same proceeding, in both store cds.cern.ch and inspirehep.net.
def test_get_conference_data_cds_02001():
"""get the conference data from cds.cern.ch.
the map of identifiers and keys is the following:
......@@ -42,11 +39,6 @@ def test_get_conference_data():
+------------------+--------------+-----------|
"""
# ........................................................................
#
# CDS
#
# by id
recjson1 = get_conference_data("cds.cern.ch", conf_id=1181092)
assert recjson1["recid"] == 1181092
......@@ -59,11 +51,21 @@ def test_get_conference_data():
assert recjson1 == recjson2
# ........................................................................
#
# INSPIRE
#
def test_get_conference_data_ins_02002():
"""get the conference data from inspirehep.net.
the map of identifiers and keys is the following:
+------------------+--------------+-----------|
| | cds | inspire |
+------------------+--------------+-----------|
| proceeding recid | 1411352 | 1089237 |
| conference recid | 1181092 | 980401 |
| conference key | rome20101206 | C10-12-06 |
+------------------+--------------+-----------|
"""
# by id
recjson3 = get_conference_data("inspirehep.net", conf_id=980401)
assert recjson3["recid"] == 980401
......@@ -76,25 +78,8 @@ def test_get_conference_data():
assert recjson3 == recjson4
def test_add_conference_data():
""" check the different approach to get the conference data
using the same proceeding, in both store cds.cern.ch and inspirehep.net.
the map of identifiers and keys is the following:
+------------------+--------------+-----------|
| | cds | inspire |
+------------------+--------------+-----------|
| proceeding recid | 1411352 | 1089237 |
| conference recid | 1181092 | 980401 |
| conference key | rome20101206 | C10-12-06 |
+------------------+--------------+-----------|
def test_add_conference_data_cds_02003():
"""
# ........................................................................
#
# CDS
#
store = InvenioStore("cds.cern.ch")
recjson = store.get_record(1411352)
......@@ -108,23 +93,8 @@ def test_add_conference_data():
assert recjson["meeting_note"]["recid"] == 1181092
# ........................................................................
#
# INSPIRE
#
store = InvenioStore("inspirehep.net")
recjson = store.get_record(1089237)
add_conference_data(recjson)
assert "meeting_name" in recjson
assert "meeting_note" in recjson
assert recjson["meeting_name"][0]["coference_code"] == "C10-12-06"
assert recjson["meeting_note"]["url"] == \
"http://www.roma1.infn.it/discrete10"
assert recjson["meeting_note"]["recid"] == 980401
def test_add_conference_data_cds_02004():
# ........................................................................
#
# EXCEPTION
......@@ -143,7 +113,23 @@ def test_add_conference_data():
"http://indico.ihep.ac.cn/event/5221/overview"
def test_conference_cds():
def test_add_conference_data_ins_02005():
store = InvenioStore("inspirehep.net")
recjson = store.get_record(1089237)
add_conference_data(recjson)
assert "meeting_name" in recjson
assert "meeting_note" in recjson
assert recjson["meeting_name"][0]["coference_code"] == "C10-12-06"
assert recjson["meeting_note"]["url"] == \
"http://www.roma1.infn.it/discrete10"
assert recjson["meeting_note"]["recid"] == 980401
def test_conference_cds_02006():
store = InvenioStore("cds.cern.ch")
recjson = store.get_record(1411352)
......@@ -156,7 +142,7 @@ def test_conference_cds():
assert isinstance(record, RecordConf)
def test_conference_inspirehep():
def test_conference_ins_02007():
store = InvenioStore("inspirehep.net")
recjson = store.get_record(1276938)
......@@ -169,7 +155,7 @@ def test_conference_inspirehep():
assert isinstance(record, RecordConf)
def test_talk_cds():
def test_talk_cds_02008():
store = InvenioStore("cds.cern.ch")
recjson = store.get_record(2239092)
......@@ -186,7 +172,7 @@ def test_talk_cds():
#
# Institute
#
def test_add_affiliation_keys():
def test_add_affiliation_keys_ins_02009():
"""CPPM"""
store = InvenioStore("inspirehep.net")
recjson = store.get_record(902989)
......@@ -200,7 +186,7 @@ def test_add_affiliation_keys():
"CPPM, Marseille"
def test_institute():
def test_institute_ins_02010():
"""CPPM"""
store = InvenioStore("inspirehep.net")
recjson = store.get_record(902989)
......@@ -217,7 +203,7 @@ def test_institute():
#
# Article, ...
#
def test_publi_cds():
def test_article_cds_02011():
"""Precision luminosity measurements at LHCb"""
store = InvenioStore("cds.cern.ch")
......@@ -231,7 +217,7 @@ def test_publi_cds():
assert isinstance(record, RecordPubli)
def test_publi_inspirehep():
def test_article_inspirehep_02012():
"""Precision luminosity measurements at LHCb"""
store = InvenioStore("inspirehep.net")
......@@ -249,7 +235,7 @@ def test_publi_inspirehep():
#
# Thesis
#
def test_thesis_cds():
def test_thesis_cds_02013():
store = InvenioStore("cds.cern.ch")
recjson = store.get_record(1632177)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment