Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
limbra
limbra
Commits
cbd1df45
Commit
cbd1df45
authored
Jan 18, 2021
by
LE GAC Renaud
Browse files
Update tests/issues/test_60_acti.py
parent
05432dd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
33 deletions
+26
-33
tests/issues/test_60_acti.py
tests/issues/test_60_acti.py
+26
-33
No files found.
tests/issues/test_60_acti.py
View file @
cbd1df45
"""test_acti
"""test_
60_
acti
* collection of proceeding with issues
* collection of proceeding with issues
"""
"""
import
pytest
from
gluon
import
current
from
harvest_tools.checkandfix
import
CheckAndFix
from
store_tools
import
load_record
from
store_tools
import
load_record
@
pytest
.
fixture
(
scope
=
"module"
)
def
test_acti_cds1411352_60001
():
def
svc
():
return
CheckAndFix
()
def
test_acti_cds1411352
(
svc
):
"""
"""
XML:
XML:
* Only the first authors is defined
* Only the first authors is defined
...
@@ -25,35 +18,35 @@ def test_acti_cds1411352(svc):
...
@@ -25,35 +18,35 @@ def test_acti_cds1411352(svc):
* Authors fix by the JSON encoding
* Authors fix by the JSON encoding
* Other issues are treated by CheckAndFix
* Other issues are treated by CheckAndFix
"""
"""
rec
cds
=
load_record
(
'cds.cern.ch'
,
1411352
)
rec
ord
=
load_record
(
'cds.cern.ch'
,
1411352
)
assert
rec
cds
.
authors
()
==
"Leroy, Olivier"
assert
rec
ord
.
authors
()
==
"Leroy, Olivier"
assert
rec
cds
.
conference_dates
()
==
"6
-
11 Dec 2010"
assert
rec
ord
.
conference_dates
()
==
"6
-
11 Dec 2010"
assert
rec
cds
.
submitted
()
==
"05 Jan 2012"
assert
rec
ord
.
submitted
()
==
"05 Jan 2012"
svc
.
conference_date
(
reccds
)
record
.
check_
conference_date
()
svc
.
submitted
(
reccds
)
record
.
check_
submitted
_date
(
)
assert
rec
cds
.
conference_dates
()
==
"6-11 Dec 2010"
assert
rec
ord
.
conference_dates
()
==
"6-11 Dec 2010"
assert
rec
cds
.
submitted
()
==
"201
2-01
-0
5
"
assert
rec
ord
.
submitted
()
==
"201
0-12
-0
6
"
def
test_acti_cds2270937
(
svc
):
def
test_acti_cds2270937
_60002
(
):
"""
"""
JSON:
JSON:
* Author name not well formatted when using F. Last.
* Author name not well formatted when using F. Last.
* More general design of the function recordpubli.to_initial
* More general design of the function recordpubli.to_initial
"""
"""
rec
cds
=
load_record
(
'cds.cern.ch'
,
2270937
)
rec
ord
=
load_record
(
'cds.cern.ch'
,
2270937
)
assert
rec
cds
.
first_author
()
==
"De Bruyn, Kristof Antoon M"
assert
rec
ord
.
first_author
()
==
"De Bruyn, Kristof Antoon M"
svc
.
format_authors
(
reccds
,
fmt
=
"F. Last"
)
record
.
check_
format_authors
(
fmt
=
"F. Last"
)
assert
rec
cds
.
first_author
()
==
"K. A. M. De Bruyn"
assert
rec
ord
.
first_author
()
==
"K. A. M. De Bruyn"
def
test_acti_ins1276938
(
svc
):
def
test_acti_ins1276938
_60003
(
):
"""
"""
XML:
XML:
* Only first author is defined
* Only first author is defined
...
@@ -67,15 +60,15 @@ def test_acti_ins1276938(svc):
...
@@ -67,15 +60,15 @@ def test_acti_ins1276938(svc):
* others issues are fixed by CheckAndFix
* others issues are fixed by CheckAndFix
"""
"""
rec
ins
=
load_record
(
'inspirehep.net'
,
1276938
)
rec
ord
=
load_record
(
'inspirehep.net'
,
1276938
,
shelf
=
"literature"
)
assert
rec
ins
.
authors
()
==
"Hubaut, F."
assert
rec
ord
.
authors
()
==
"Hubaut, F."
assert
rec
ins
.
first_author
()
==
"Hubaut, F."
assert
rec
ord
.
first_author
()
==
"Hubaut, F."
assert
rec
ins
.
collaboration
()
==
"ATLAS"
assert
rec
ord
.
collaboration
()
==
"ATLAS"
assert
rec
ins
.
submitted
()
==
""
assert
rec
ord
.
submitted
()
==
""
svc
.
collaboration
(
recins
)
record
.
check_
collaboration
(
current
.
db
)
svc
.
submitted
(
recins
)
record
.
check_
submitted
_date
(
)
assert
rec
ins
.
collaboration
()
==
"ATLAS Collaboration"
assert
rec
ord
.
collaboration
()
==
"ATLAS Collaboration"
assert
rec
ins
.
submitted
()
==
"2013-03-02"
assert
rec
ord
.
submitted
()
==
"2013-03-02"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment