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

Commit 321d9aa3 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update basis/test_03_Record.

parent eec5c1f9
# -*- coding: utf-8 -*-
"""test_03_Record
Test all methods of the Record class for a given article:
......@@ -32,7 +31,7 @@ def recins():
return Record(recjson)
def test__get(reccds):
def test__get_cds_03001(reccds):
assert reccds._get("subject", "source") == "arXiv"
assert reccds._get("subject", "source", force_list=True) == ["arXiv"]
......@@ -41,47 +40,50 @@ def test__get(reccds):
assert len(authors) == reccds["number_of_authors"]
def test__oai_url(reccds):
def test__oai_url_cds_03002(reccds):
oai = reccds["oai"]["value"]
assert reccds._oai_url(oai) == "http://cds.cern.ch/record/1951625"
def test_id(reccds):
def test_id_cds_03003(reccds):
assert reccds.id() == 1951625
def test_primary_oai(reccds, recins):
def test_primary_oai_cds_03004(reccds):
assert reccds.primary_oai() == "oai:cds.cern.ch:1951625"
assert recins.primary_oai() == "oai:inspirehep.net:1319638"
def test_secondary_oai(reccds, recins):
assert reccds.secondary_oai() == "oai:inspirehep.net:1319638"
assert recins.secondary_oai() == "oai:cds.cern.ch:1951625"
def test_primary_oai_ins_03005(recins):
assert recins.primary_oai() == "oai:inspirehep.net:1319638"
def test_oai(reccds, recins):
def test_oai_03006(reccds):
assert reccds.oai() == \
"oai:cds.cern.ch:1951625, oai:inspirehep.net:1319638"
def test_oai_ins_03007(reccds, recins):
assert recins.oai() == \
"oai:inspirehep.net:1319638, oai:cds.cern.ch:1951625"
def test_primary_oai_url(reccds):
def test_primary_oai_url_cds_03008(reccds):
assert reccds.primary_oai_url() == "http://cds.cern.ch/record/1951625"
def test_secondary_oai_url(reccds):
def test_secondary_oai_url_cds_03009(reccds):
assert reccds.secondary_oai_url() == "http://inspirehep.net/record/1319638"
def test_oai_url(reccds):
def test_oai_url_cds_03010(reccds):
assert reccds.oai_url() == \
"http://cds.cern.ch/record/1951625, " \
"http://inspirehep.net/record/1319638"
def test_host(reccds, recins):
def test_host_cds_03011(reccds):
assert reccds.host() == "cds.cern.ch"
def test_host_ins_03012(recins):
assert recins.host() == "inspirehep.net"
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