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
11d01d97
Commit
11d01d97
authored
May 30, 2017
by
LE GAC Renaud
Browse files
Restore tests/invenio_tools/Record.
parent
fe4859a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
13 deletions
+28
-13
tests/invenio_tools/Record/test_acl_cds1951625.py
tests/invenio_tools/Record/test_acl_cds1951625.py
+16
-1
tests/invenio_tools/Record/test_acti_ins1276938.py
tests/invenio_tools/Record/test_acti_ins1276938.py
+5
-5
tests/invenio_tools/Record/test_phd_cds1632177.py
tests/invenio_tools/Record/test_phd_cds1632177.py
+2
-2
tests/invenio_tools/Record/test_record_non_conformities.py
tests/invenio_tools/Record/test_record_non_conformities.py
+5
-5
No files found.
tests/invenio_tools/Record/test_acl_cds1951625.py
View file @
11d01d97
...
...
@@ -64,6 +64,21 @@ def test_find_affiliation(record):
assert
affiliation
==
"Marseille, CPPM"
def
test_find_authors
(
record
):
assert
record
.
find_authors
(
"Leo"
)
==
u
"Beaucourt, Leo|Kravchuk, Leonid|Leo, Sabato"
def
test_find_authors_by_affiliation
(
record
):
pattern
=
"CPPM, Marseille|Marseille, CPPM"
authors
=
record
.
find_authors_by_affiliation
(
pattern
)
assert
authors
==
u
"Akar, Simon|Aslanides, Elie|Cogan, Julien|"
\
u
"Kanso, Walaa|Le Gac, Renaud|Leroy, Olivier|"
\
u
"Mancinelli, Giampiero|Mordà, Alessandro|"
\
u
"Perrin-Terrin, Mathieu|Serrano, Justine|"
\
u
"Tsaregorodtsev, Andrei"
def
test_first_author
(
record
):
assert
record
.
first_author
()
==
"Aaij, Roel"
...
...
@@ -99,7 +114,7 @@ def test_oai(record):
def
test_paper_reference
(
record
):
assert
record
.
paper_editor
()
==
"J
. Instrum.
"
assert
record
.
paper_editor
()
==
"J
INST
"
assert
record
.
paper_pages
()
==
"P12005"
assert
record
.
paper_volume
()
==
"9"
assert
record
.
paper_year
()
==
"2014"
...
...
tests/invenio_tools/Record/test_acti_ins1276938.py
View file @
11d01d97
...
...
@@ -29,9 +29,9 @@ def record():
def
test_affiliations
(
record
):
assert
record
.
is_affiliations
()
==
Fals
e
assert
record
.
is_affiliation_for_all
()
==
Fals
e
assert
record
.
institutes
()
==
[]
assert
record
.
is_affiliations
()
==
Tru
e
assert
record
.
is_affiliation_for_all
()
==
Tru
e
assert
record
.
institutes
()
==
[
"Marseille, CPPM"
]
def
test_authors
(
record
):
...
...
@@ -80,7 +80,7 @@ def test_first_author(record):
def
test_first_institutes
(
record
):
assert
record
.
first_author_institutes
()
==
""
assert
record
.
first_author_institutes
()
==
"
Marseille, CPPM
"
def
test_host
(
record
):
...
...
@@ -145,4 +145,4 @@ def test_title(record):
def
test_year
(
record
):
assert
record
.
year
()
==
""
assert
record
.
year
()
==
"
2013
"
tests/invenio_tools/Record/test_phd_cds1632177.py
View file @
11d01d97
...
...
@@ -51,7 +51,7 @@ def test_first_author(record):
def
test_first_institutes
(
record
):
assert
record
.
first_author_institutes
()
==
"Shandong U.
,
Marseille, CPPM"
assert
record
.
first_author_institutes
()
==
"Shandong U.
|
Marseille, CPPM"
def
test_host
(
record
):
...
...
@@ -104,7 +104,7 @@ def test_these_level(record):
def
test_these_directors
(
record
):
assert
record
.
these_directors
()
==
"He, Mao
,
Monnier, Emmanuel
,
Zhu, Chengguang"
assert
record
.
these_directors
()
==
"He, Mao
|
Monnier, Emmanuel
|
Zhu, Chengguang"
def
test_these_town
(
record
):
...
...
tests/invenio_tools/Record/test_record_non_conformities.py
View file @
11d01d97
...
...
@@ -21,10 +21,10 @@ def test_protection_find_authors_by_affiliation():
record
=
load_record
(
'cds.cern.ch'
,
2012165
)
pattern
=
"Marseille, CPPM|CPPM, Marseille"
authors
=
record
.
find_authors_by_affiliation
(
pattern
)
assert
authors
==
u
"Akar, Simon
,
Aslanides, Elie
,
Cogan, Julien
,
"
\
u
"Kanso, Walaa
,
Le Gac, Renaud
,
Leroy, Olivier
,
"
\
u
"Mancinelli, Giampiero
,
Mordà, Alessandro
,
"
\
u
"Serrano, Justine
,
Tsaregorodtsev, Andrei"
assert
authors
==
u
"Akar, Simon
|
Aslanides, Elie
|
Cogan, Julien
|
"
\
u
"Kanso, Walaa
|
Le Gac, Renaud
|
Leroy, Olivier
|
"
\
u
"Mancinelli, Giampiero
|
Mordà, Alessandro
|
"
\
u
"Serrano, Justine
|
Tsaregorodtsev, Andrei"
def
test_protection_first_author
():
...
...
@@ -48,7 +48,7 @@ def test_protection_paper_year():
def
test_protection_paper_url
():
record
=
load_record
(
'cds.cern.ch'
,
2014733
)
assert
record
.
paper_url
()
==
"http://
arxiv.org/pdf/
1505.01654"
assert
record
.
paper_url
()
==
"http://
cds.cern.ch/record/2014733/files/arXiv:
1505.01654
.pdf
"
def
test_protection_year
():
...
...
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