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

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

Apply 2to3 converter to tests.

parent 99ea7f72
# -*- coding: utf-8 -*-
"""test_all_harvester
"""
......
# -*- coding: utf-8 -*-
"""test_reject_on_oai
"""
......@@ -18,7 +17,7 @@ def test_is_record_in_db():
row = db(query).select().first()
assert row.origin == "http://cds.cern.ch/record/1389907, http://inspirehep.net/record/939619"
atm = Automaton(db, 7, 8, u"articles", 2)
atm = Automaton(db, 7, 8, "articles", 2)
rec_id_1 = atm._is_record_in_db("Luminosity measurement",
host="cds.cern.ch",
......
# -*- coding: utf-8 -*-
"""test_single_harvester
"""
......
# -*- coding: utf-8 -*-
"""ARTICLE
http://cds.cern.ch/record/1753190.
......
# -*- coding: utf-8 -*-
"""ARTICLE
http://cds.cern.ch/record/1951625.
......@@ -28,17 +27,17 @@ from invenio_tools import load_record
from plugin_dbui import get_id
CPPM_AUTHORS = [u"S. Akar",
u"E. Aslanides",
u"J. Cogan",
u"W. Kanso",
u"R. Le Gac",
u"O. Leroy",
u"G. Mancinelli",
u"A. Mordà",
u"M. Perrin-Terrin",
u"J. Serrano",
u"A. Tsaregorodtsev"]
CPPM_AUTHORS = ["S. Akar",
"E. Aslanides",
"J. Cogan",
"W. Kanso",
"R. Le Gac",
"O. Leroy",
"G. Mancinelli",
"A. Mordà",
"M. Perrin-Terrin",
"J. Serrano",
"A. Tsaregorodtsev"]
@pytest.fixture(scope="module")
......@@ -109,7 +108,7 @@ def test_my_affiliation(record):
# delete the affiliation
# and check that the affiliation is performed via the rescue list
rec[u"700"].u = ""
rec["700"].u = ""
value = svc.my_affiliation(rec, id_project, id_team, "F. Last")
assert value == ""
......
# -*- coding: utf-8 -*-
"""ARTICLE
http://inspirehep.net/record/1278588.
......
# -*- coding: utf-8 -*-
"""PROCEEDING
http://cds.cern.ch/record/1411352
......
# -*- coding: utf-8 -*-
"""PROCEEDING
http://inspirehep.net/record/1276938
......
# -*- coding: utf-8 -*-
"""CheckAndFix non conformities
"""
......@@ -13,10 +12,10 @@ def test_protection_format_authors():
svc = CheckAndFix()
svc.format_authors(record, "F. Last")
authors = record[u"700"]
authors = record["700"]
assert len(authors) == 140
assert authors.iloc[0].fmt_name == u"S. Adrián-Martínez"
assert authors.iloc[128].fmt_name == u"J. D. Zornoza"
assert authors.iloc[139].fmt_name == u"D. M. Coward"
assert authors.iloc[0].fmt_name == "S. Adrián-Martínez"
assert authors.iloc[128].fmt_name == "J. D. Zornoza"
assert authors.iloc[139].fmt_name == "D. M. Coward"
# -*- coding: utf-8 -*-
"""TALK
http://cds.cern.ch/record/1550918
......
# -*- coding: utf-8 -*-
"""PHD
http://cds.cern.ch/record/1394605
......@@ -63,7 +62,7 @@ def test_submitted(record):
def test_these_universities(record):
assert record.these_universities() == [u"Université de la Méditerrannée Aix-Marseille II"]
assert record.these_universities() == ["Université de la Méditerrannée Aix-Marseille II"]
def test_year(record):
......
# -*- coding: utf-8 -*-
"""PHD
http://cds.cern.ch/record/1632177
......
# -*- coding: utf-8 -*-
"""PHD
http://cds.cern.ch/record/1642541
......@@ -63,7 +62,7 @@ def test_submitted(record):
def test_these_universities(record):
assert record.these_universities() == [u"Aix Marseille Université"]
assert record.these_universities() == ["Aix Marseille Université"]
def test_year(record):
......
# -*- coding: utf-8 -*-
"""PHD
http://cds.cern.ch/record/2015250
......@@ -6,8 +5,6 @@
"""
import pytest
from gluon import current
from harvest_tools import CheckAndFix
from invenio_tools import load_record
......@@ -16,7 +13,6 @@ from invenio_tools import load_record
def test_these_universities():
record = load_record('cds.cern.ch', 2015250)
svc = CheckAndFix()
svc._get_reg_institute()
......@@ -24,4 +20,4 @@ def test_these_universities():
svc.format_universities(record)
assert record.these_universities() == [u"Milan Bicocca Université"]
assert record.these_universities() == ["Milan Bicocca Université"]
# -*- coding: utf-8 -*-
"""CheckAndfix non conformities
Test some of the recovery mechanisms implement in the CheckAndFix class.
"""
import pytest
from harvest_tools import CheckAndFix
from invenio_tools import load_record
......
# -*- coding: utf-8 -*-
"""test harvest_tools functions
"""
import pytest
from gluon import current
from harvest_tools import search_synonym, ToolException
from invenio_tools import load_record
......@@ -14,10 +10,10 @@ def test_author_type():
"""Check the type of string returns by the author functions is unicode."""
record = load_record('inspirehep.net', 1278588)
assert type(record.first_author()) == unicode
assert type(record.first_author()) == str
for author in record.authors_as_list():
assert type(author) == unicode
assert type(author) == str
def test_search_synonym():
......
# -*- coding: utf-8 -*-
"""http://cds.cern.ch/record1951625
"""
......
# -*- coding: utf-8 -*-
"""test_inveniostore
"""
......
# -*- coding: utf-8 -*-
"""test_marc
"""
import pytest
from invenio_tools import (is_conference,
is_institute,
is_thesis,
......
# -*- coding: utf-8 -*-
"""ARTICLE
http://cds.cern.ch/record/1753190.
......
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