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
Open sidebar
limbra
limbra
Commits
85e065c7
Commit
85e065c7
authored
Jan 18, 2021
by
LE GAC Renaud
Browse files
Update test_80_phd.py
parent
8edcaeb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
tests/issues/test_80_phd.py
tests/issues/test_80_phd.py
+71
-0
No files found.
tests/issues/test_phd.py
→
tests/issues/test_
80_
phd.py
View file @
85e065c7
# -*- coding: utf-8 -*-
"""test_phd
"""test_80_phd
* collection of phd theses with issues
"""
import
pytest
from
harvest_tools.checkandfix
import
CheckAndFix
from
store_tools
import
load_record
from
store_tools
import
CheckException
,
load_record
@
pytest
.
fixture
(
scope
=
"module"
)
def
svc
():
return
CheckAndFix
()
def
test_phd_cds1394605
(
svc
):
def
test_phd_cds1394605_80001
():
"""
XML:
* Only the first author is defined
...
...
@@ -29,24 +22,24 @@ def test_phd_cds1394605(svc):
* Nothing can be done for the defence date
"""
rec
cds
=
load_record
(
'cds.cern.ch'
,
1394605
)
rec
ord
=
load_record
(
'cds.cern.ch'
,
1394605
)
assert
rec
cds
.
authors
()
==
u
"Khanji, Basem"
assert
rec
cds
.
first_author
()
==
u
"Khanji, Basem"
assert
rec
cds
.
first_author_institutes
()
==
u
"Marseille, CPPM"
assert
rec
cds
.
these_defense
()
==
"2011"
assert
rec
cds
.
these_universities
()
==
u
"Marseille U., Luminy"
assert
rec
cds
.
submitted
()
==
""
assert
rec
ord
.
authors
()
==
u
"Khanji, Basem"
assert
rec
ord
.
first_author
()
==
u
"Khanji, Basem"
assert
rec
ord
.
first_author_institutes
()
==
u
"Marseille, CPPM"
assert
rec
ord
.
these_defense
()
==
"2011"
assert
rec
ord
.
these_universities
()
==
u
"Marseille U., Luminy"
assert
rec
ord
.
submitted
()
==
""
svc
.
submitted
(
reccds
)
svc
.
format_universities
(
reccds
)
assert
reccds
.
submitted
()
==
"2011-11"
assert
reccds
.
these_universities
()
==
\
record
.
format_universities
()
assert
record
.
these_universities
()
==
\
u
"Université de la Méditerrannée Aix-Marseille II"
with
pytest
.
raises
(
CheckException
):
record
.
check_submitted_date
()
def
test_phd_cds1632177
(
svc
):
def
test_phd_cds1632177
_80002
(
):
"""
XML:
* Only the first author is defined
...
...
@@ -59,20 +52,20 @@ def test_phd_cds1632177(svc):
* Submitted date and University names are fixed by CheckAndFix
"""
rec
cds
=
load_record
(
'cds.cern.ch'
,
1632177
)
rec
ord
=
load_record
(
'cds.cern.ch'
,
1632177
)
assert
rec
cds
.
authors
()
==
u
"Chen, Liming"
assert
rec
cds
.
first_author
()
==
u
"Chen, Liming"
assert
rec
cds
.
first_author_institutes
()
==
u
"Shandong U.|Marseille, CPPM"
assert
rec
cds
.
these_universities
()
==
u
"Shandong U. & Marseille, CPPM"
assert
rec
cds
.
submitted
()
==
""
assert
rec
ord
.
authors
()
==
u
"Chen, Liming"
assert
rec
ord
.
first_author
()
==
u
"Chen, Liming"
assert
rec
ord
.
first_author_institutes
()
==
u
"Shandong U.|Marseille, CPPM"
assert
rec
ord
.
these_universities
()
==
u
"Shandong U. & Marseille, CPPM"
assert
rec
ord
.
submitted
()
==
""
svc
.
submitted
(
reccds
)
svc
.
format_universities
(
reccds
)
record
.
check_
submitted
_date
(
)
record
.
format_universities
()
assert
rec
cds
.
first_author_institutes
()
==
u
"Shandong U.|Marseille, CPPM"
assert
rec
ord
.
first_author_institutes
()
==
u
"Shandong U.|Marseille, CPPM"
assert
rec
cds
.
these_universities
()
==
\
assert
rec
ord
.
these_universities
()
==
\
u
"Shandong Université & Aix Marseille Université"
assert
rec
cds
.
submitted
()
==
"2013-12-10"
assert
rec
ord
.
submitted
()
==
"2013-12-10"
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