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

Renumber some tests

parent ff0e3844
......@@ -34,75 +34,75 @@ def recins():
return load_record("inspirehep.net", 1089237, shelf="literature")
def test_conference_location_cds_05001(reccds):
def test_conference_location_cds_06001(reccds):
assert reccds.conference_location() == "Rome, Italy"
def test_conference_location_ins_05002(recins):
def test_conference_location_ins_06002(recins):
assert recins.conference_location() == "Rome, Italy"
def test_conference_country_cds_05003(reccds):
def test_conference_country_cds_06003(reccds):
assert reccds.conference_country() == "Italy"
def test_conference_country_ins_05004(recins):
def test_conference_country_ins_06004(recins):
assert recins.conference_country() == "Italy"
def test_conference_dates_cds_05005(reccds):
def test_conference_dates_cds_06005(reccds):
assert reccds.conference_dates() == "6 - 11 Dec 2010"
def test_conference_dates_ins_05006(recins):
def test_conference_dates_ins_06006(recins):
assert recins.conference_dates() == "6-11 Dec 2010"
def test_conference_id_cds_05007(reccds):
def test_conference_id_cds_06007(reccds):
assert reccds.conference_id() == 1181092
def test_conference_id_ins_05008(recins):
def test_conference_id_ins_06008(recins):
assert recins.conference_id() == 980401
def test_conference_key_cds_05009(reccds):
def test_conference_key_cds_06009(reccds):
assert reccds.conference_key() == "rome20101206"
def test_conference_key_ins_05010(recins):
def test_conference_key_ins_06010(recins):
assert recins.conference_key() == "C10-12-06"
def test_conference_title_cds_05011(reccds):
def test_conference_title_cds_06011(reccds):
assert reccds.conference_title() == \
"Symposium on Prospects in the Physics of Discrete Symmetries"
def test_conference_title_ins_05012(recins):
def test_conference_title_ins_06012(recins):
assert recins.conference_title() == \
"2nd Symposium on Prospects in the Physics of Discrete Symmetries"
def test_conference_town_cds_05013(reccds):
def test_conference_town_cds_06013(reccds):
assert reccds.conference_town() == "Rome"
def test_conference_town_ins_05014(recins):
def test_conference_town_ins_06014(recins):
assert recins.conference_town() == "Rome"
def test_conference_url_cds_05015(reccds):
def test_conference_url_cds_06015(reccds):
assert reccds.conference_url() == "http://www.roma1.infn.it/discrete10"
def test_conference_url_ins_05016(recins):
def test_conference_url_ins_06016(recins):
assert recins.conference_url() == "http://www.roma1.infn.it/discrete10"
def test_conference_year_cds_05017(reccds):
def test_conference_year_cds_06017(reccds):
assert reccds.conference_year() == "2010"
def test_conference_year_ins_05018(recins):
def test_conference_year_ins_06018(recins):
assert recins.conference_year() == "2010"
"""test_06_RecordThesis
"""test_07_RecordThesis
Test specific methods of the RecordThesis class for::
......@@ -28,21 +28,21 @@ def reccds():
return load_record("cds.cern.ch", 1632177)
def test_authors_as_list_cds_06001(reccds):
def test_authors_as_list_cds_07001(reccds):
assert reccds.authors_as_list() == [u'Chen, Liming']
def test_these_defense_cds_06002(reccds):
def test_these_defense_cds_07002(reccds):
assert reccds.these_defense() == "2013-12-10"
def test_these_level_cds_06003(reccds):
def test_these_level_cds_07003(reccds):
assert reccds.these_level() == "PhD"
def test_these_directors_cds_06004(reccds):
def test_these_directors_cds_07004(reccds):
assert reccds.these_directors(sep=u"|") == ""
def test_these_universities_cds_06005(reccds):
def test_these_universities_cds_07005(reccds):
assert reccds.these_universities() == "Shandong U. & Marseille, CPPM"
# -*- coding: utf-8 -*-
"""test_06_RecordThesis
"""test_08_RecordThesis
Test specific methods of the RecordInst class for CPPM
......@@ -14,36 +13,36 @@ def record():
return load_record("inspirehep.net", 902989, shelf="institutions")
def test_exception_host_ins_07001():
def test_exception_host_ins_08001():
record = load_record("cds.cern.ch", 1951625)
with pytest.raises(RecordException):
RecordInst(record)
def test_exception_record_ins_07002():
def test_exception_record_ins_08002():
record = load_record("inspirehep.net", 1319638, shelf="institutions")
with pytest.raises(RecordException):
RecordInst(record)
def test_future_identifer_ins_07003(record):
def test_future_identifer_ins_08003(record):
assert record.future_identifier() == u'CPPM, Marseille'
def test_id_ins_07004(record):
def test_id_ins_08004(record):
assert record.id() == 902989
def test_identifier_ins_07005(record):
def test_identifier_ins_08005(record):
assert record.identifier() == u'Marseille, CPPM'
def test_name_ins_07006(record):
def test_name_ins_08006(record):
assert record.name() == \
u'Centre de Physique des Particules de Marseille (CPPM)'
def test_rex_ins_07007(record):
def test_rex_ins_08007(record):
assert record.rex() == \
r"Marseille, CPPM|CPPM, Marseille|" \
"Centre de Physique des Particules de Marseille (CPPM)"
# -*- coding: utf-8 -*-
"""test_08_CheckAndFix_base
"""test_09_CheckAndFix_base
* Test CheckAndFix methods required by the Automaton base class.
- constructor
......@@ -29,22 +28,22 @@ def svc():
return CheckAndFix()
def test_constructor_08001(svc):
def test_constructor_09001(svc):
assert svc.reg_institute == \
r"(^|\|)Marseille, CPPM($|\|)|" \
r"(^|\|)CPPM, Marseille($|\|)|" \
r"(^|\|)Centre de Physique des Particules de Marseille \(CPPM\)($|\|)"
def test_is_oai_cds_08002(svc, reccds):
def test_is_oai_cds_09002(svc, reccds):
assert svc.is_oai(reccds)
def test_is_bad_oai_cds_08003(svc, reccds):
def test_is_bad_oai_cds_09003(svc, reccds):
assert not svc.is_bad_oai_used(reccds)
def test_temporary_record_cds_08004(svc, reccds):
def test_temporary_record_cds_09004(svc, reccds):
assert svc.temporary_record(reccds) is None
......@@ -62,11 +61,11 @@ def test_temporary_record_cds_08004(svc, reccds):
svc.temporary_record(recins)
def test_authors_cds_08005(svc, reccds):
def test_authors_cds_09005(svc, reccds):
assert svc.authors(reccds) is None
def test__get_author_rescue_list_cds_08006(svc, reccds):
def test__get_author_rescue_list_cds_09006(svc, reccds):
assert svc._get_author_rescue_list(reccds, 8, 7) == ["C. Adrover",
"S. Akar",
"E. Aslanides",
......@@ -84,7 +83,7 @@ def test__get_author_rescue_list_cds_08006(svc, reccds):
"A. Tsaregorodtsev"]
def test_my_affiliation_cds_08007(svc, reccds):
def test_my_affiliation_cds_09007(svc, reccds):
assert svc.my_affiliation(reccds, 8, 7) == "Marseille, CPPM"
# a paper from NA62 -- no CPPM author
......@@ -93,7 +92,7 @@ def test_my_affiliation_cds_08007(svc, reccds):
svc.my_affiliation(recna62, id_project=8, id_team=7)
def test_search_synonym_08008():
def test_search_synonym_09008():
db = current.db
# collaboration ANTARES, TANAMI (defined as synonym in the db)
......@@ -117,5 +116,5 @@ def test_search_synonym_08008():
assert colid == 2
def test_collaboration_cds_08009(svc, reccds):
def test_collaboration_cds_09009(svc, reccds):
assert svc.collaboration(reccds) is None
"""test_08_Automaton
"""test_10_Automaton
* Test Automaton methods
......@@ -25,7 +25,7 @@ def svc():
dry_run=True)
def test__is_record_in_db_09001(svc):
def test__is_record_in_db_01001(svc):
"""The record cds1389970 and ins939619 describe the same LHCb paper.
* the paper is loaded in the database from cds.cern.ch.
......@@ -60,7 +60,7 @@ def test__is_record_in_db_09001(svc):
assert rec_id_1 == rec_id_2
def test_process_recid_09002(svc):
def test_process_recid_01002(svc):
"""Test the deepest method to retrieve a record.
"""
......@@ -99,7 +99,7 @@ def test_process_recid_09002(svc):
del svc.store
def test_process_collection_09003(svc):
def test_process_collection_01003(svc):
# mimic the previous stage process_url
collection = "LHCb Papers"
......@@ -119,10 +119,10 @@ def test_process_collection_09003(svc):
del svc.store
def test_process_url_cds_09004(svc):
def test_process_url_cds_01004(svc):
assert svc.process_url("cds.cern.ch", "LHCb Papers") is None
def test_process_url_ins_09005(svc):
def test_process_url_ins_01005(svc):
assert svc.process_url(
"inspirehep.net", "find cn lhcb and tc p and not tc c") is None
"""test_10_CheckAndFix_article
"""test_11_CheckAndFix_article
* Test CheckAndFix methods for article:
- format_editor
......@@ -33,7 +33,7 @@ def svc():
return CheckAndFix()
def test_format_editor_cds_10001(svc, reccds):
def test_format_editor_cds_11001(svc, reccds):
# cds
assert reccds.paper_editor() == "Phys. Rev. D"
......@@ -45,7 +45,7 @@ def test_format_editor_cds_10001(svc, reccds):
assert reccds.paper_volume() == "95"
def test_format_editor_ins_10002(svc, recins):
def test_format_editor_ins_11002(svc, recins):
# inspire
assert recins.paper_editor() == "Phys.Rev."
assert recins.paper_volume() == "D95"
......@@ -56,11 +56,11 @@ def test_format_editor_ins_10002(svc, recins):
assert recins.paper_volume() == "95"
def test_publisher_cds_10003(svc, reccds):
def test_publisher_cds_11003(svc, reccds):
assert svc.publisher(reccds) is None
def test_paper_reference_cds_10004(svc, reccds):
def test_paper_reference_cds_11004(svc, reccds):
# check recovery procedure using DOI
# remove the publisher and volume information
......@@ -72,7 +72,7 @@ def test_paper_reference_cds_10004(svc, reccds):
assert reccds.paper_reference() == paper_ref
def test_submitted_cds_10005(svc, reccds):
def test_submitted_cds_11005(svc, reccds):
assert reccds.submitted() == "19 Jan 2017"
svc.submitted(reccds)
......@@ -89,12 +89,12 @@ def test_submitted_cds_10005(svc, reccds):
assert reccds.submitted() == "2017-01"
def test_submitted_ins_10006(svc, recins):
def test_submitted_ins_11006(svc, recins):
assert recins.submitted() == "2017-01-19"
def test_format_authors_cds_10007(svc, reccds):
def test_format_authors_cds_11007(svc, reccds):
authors = reccds.authors_as_list()
......@@ -113,7 +113,7 @@ def test_format_authors_cds_10007(svc, reccds):
assert authors[-1] == "S. Zucchelli"
def test_get_my_authors_cds_10008(svc, reccds):
def test_get_my_authors_cds_11008(svc, reccds):
svc.format_authors(reccds, fmt="F. Last")
assert svc.get_my_authors(reccds, sep="|", sort=True) is None
......
"""test_11_CheckAndFix_proceeding
"""test_12_CheckAndFix_proceeding
* Test CheckAndFix methods for proceeding.
Use the same proceeding in cds.cern.ch and inspirehep.net
......@@ -39,7 +39,7 @@ def svc():
return CheckAndFix()
def test_is_conference_cds_11001(svc, reccds):
def test_is_conference_cds_12001(svc, reccds):
assert svc.is_conference(reccds) is None
# test exception
......@@ -50,26 +50,26 @@ def test_is_conference_cds_11001(svc, reccds):
svc.is_conference(reccds2)
def test_is_conference_ins_11002(svc, recins):
def test_is_conference_ins_12002(svc, recins):
assert svc.is_conference(recins) is None
def test_country_cds_11003(svc, reccds):
def test_country_cds_12003(svc, reccds):
assert svc.country(reccds) is None
def test_country_ins_11004(svc, recins):
def test_country_ins_12004(svc, recins):
assert svc.country(recins) is None
def test_conference_date_cds_11005(svc, reccds):
def test_conference_date_cds_12005(svc, reccds):
assert reccds.conference_dates() == "6 - 11 Dec 2010"
svc.conference_date(reccds)
assert reccds.conference_dates() == "6-11 Dec 2010"
def test_conference_date_cds_11006(svc):
def test_conference_date_cds_12006(svc):
reccds = load_record("cds.cern.ch", 2688580)
assert reccds.conference_dates() == "04-06 Sept 2019"
......@@ -78,20 +78,20 @@ def test_conference_date_cds_11006(svc):
assert reccds.conference_dates() == "4-6 Sep 2019"
def test_conference_date_ins_11007(svc, recins):
def test_conference_date_ins_12007(svc, recins):
assert recins.conference_dates() == "6-11 Dec 2010"
svc.conference_date(recins)
assert recins.conference_dates() == "6-11 Dec 2010"
def test_submitted_cds_11008(svc, reccds):
def test_submitted_cds_12008(svc, reccds):
assert reccds.submitted() == "05 Jan 2012"
svc.submitted(reccds)
assert reccds.submitted() == "2012-01-05"
def test_submitted_ins_11009(svc, recins):
def test_submitted_ins_12009(svc, recins):
assert recins.submitted() == "2011"
svc.submitted(recins)
assert recins.submitted() == "2010-12-06"
"""test_12_CheckAndFix_thesis
"""test_13_CheckAndFix_thesis
* Test CheckAndFix methods for thesis.
Use the one talk in cds.cern.ch
......@@ -26,11 +26,11 @@ def svc():
return CheckAndFix()
def test_is_thesis_cds_12001(svc, reccds):
def test_is_thesis_cds_13001(svc, reccds):
assert svc.is_thesis(reccds) is None
def test_submitted_cds_12002(svc, reccds):
def test_submitted_cds_13002(svc, reccds):
assert reccds.these_defense() == "2011"
assert reccds.submitted() == ""
......@@ -39,7 +39,7 @@ def test_submitted_cds_12002(svc, reccds):
assert reccds.submitted() == "2011-11"
def test_format_universities_cds_12003(svc, reccds):
def test_format_universities_cds_13003(svc, reccds):
# Khanji en 2011 (Université de la Méditerrannée)
assert reccds["dissertation_note"]["university"] == \
......
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