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
6b8fe4f7
Commit
6b8fe4f7
authored
Sep 22, 2015
by
LE GAC Renaud
Browse files
Rename RecordPubli.is_institute_defined to is_affiliation_for_all.
parent
2e792df6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
19 deletions
+19
-19
modules/invenio_tools/recordpubli.py
modules/invenio_tools/recordpubli.py
+11
-11
tests/harvester/CheckAndFix/test_acti_cds1411352_fix.py
tests/harvester/CheckAndFix/test_acti_cds1411352_fix.py
+2
-2
tests/harvester/Record/test_acl_cds1951625.py
tests/harvester/Record/test_acl_cds1951625.py
+1
-1
tests/harvester/Record/test_acl_ins1319638.py
tests/harvester/Record/test_acl_ins1319638.py
+1
-1
tests/harvester/Record/test_acti_cds1411352.py
tests/harvester/Record/test_acti_cds1411352.py
+1
-1
tests/harvester/Record/test_acti_ins1276938.py
tests/harvester/Record/test_acti_ins1276938.py
+1
-1
tests/harvester/Record/test_com_cds1550918.py
tests/harvester/Record/test_com_cds1550918.py
+1
-1
tests/harvester/Record/test_phd_cds1632177.py
tests/harvester/Record/test_phd_cds1632177.py
+1
-1
No files found.
modules/invenio_tools/recordpubli.py
View file @
6b8fe4f7
...
...
@@ -269,17 +269,8 @@ class RecordPubli(Record):
return
True
def
is_authors
(
self
):
"""C{True} when authors are defined.
@rtype: bool
@return:
"""
return
u
"100"
in
self
or
u
"700"
in
self
def
is_institute_defined
(
self
):
"""C{True} when institutes are defined for all authors.
def
is_affiliation_for_all
(
self
):
"""C{True} when affiliation are defined for all authors.
@rtype: bool
@return:
...
...
@@ -306,6 +297,15 @@ class RecordPubli(Record):
return
False
def
is_authors
(
self
):
"""C{True} when authors are defined.
@rtype: bool
@return:
"""
return
u
"100"
in
self
or
u
"700"
in
self
def
is_published
(
self
):
"""Return true is the record is published.
...
...
tests/harvester/CheckAndFix/test_acti_cds1411352_fix.py
View file @
6b8fe4f7
...
...
@@ -68,10 +68,10 @@ def test_first_institutes(record, recordfix):
def
test_institutes
(
record
,
recordfix
):
assert
record
.
institutes
()
==
[]
assert
record
.
is_
institute_defined
()
==
False
assert
record
.
is_
affiliation_for_all
()
==
False
assert
recordfix
.
institutes
()
==
[
"Marseille, CPPM"
]
assert
recordfix
.
is_
institute_defined
()
==
True
assert
recordfix
.
is_
affiliation_for_all
()
==
True
def
test_submitted
(
record
,
recordfix
):
...
...
tests/harvester/Record/test_acl_cds1951625.py
View file @
6b8fe4f7
...
...
@@ -65,7 +65,7 @@ def test_id(record):
def
test_institutes
(
record
):
assert
record
.
is_affiliations
()
==
True
assert
record
.
is_
institute_defined
()
==
True
assert
record
.
is_
affiliation_for_all
()
==
True
institutes
=
record
.
institutes
()
...
...
tests/harvester/Record/test_acl_ins1319638.py
View file @
6b8fe4f7
...
...
@@ -65,7 +65,7 @@ def test_institutes(record):
assert
institutes
[
44
]
==
"MIT"
assert
institutes
[
-
1
]
==
"Zurich U."
assert
record
.
is_
institute_defined
()
==
True
assert
record
.
is_
affiliation_for_all
()
==
True
def
test_is_article
(
record
):
...
...
tests/harvester/Record/test_acti_cds1411352.py
View file @
6b8fe4f7
...
...
@@ -84,7 +84,7 @@ def test_id(record):
def
test_institutes
(
record
):
assert
record
.
institutes
()
==
[]
assert
record
.
is_
institute_defined
()
==
False
assert
record
.
is_
affiliation_for_all
()
==
False
def
test_is_proceeding
(
record
):
assert
isinstance
(
record
,
RecordConf
)
...
...
tests/harvester/Record/test_acti_ins1276938.py
View file @
6b8fe4f7
...
...
@@ -88,7 +88,7 @@ def test_institutes(record):
institutes
=
record
.
institutes
()
assert
record
.
institutes
()
==
[]
assert
record
.
is_
institute_defined
()
==
False
assert
record
.
is_
affiliation_for_all
()
==
False
def
test_is_proceeding
(
record
):
...
...
tests/harvester/Record/test_com_cds1550918.py
View file @
6b8fe4f7
...
...
@@ -84,7 +84,7 @@ def test_institutes(record):
institutes
=
record
.
institutes
()
assert
record
.
institutes
()
==
[]
assert
record
.
is_
institute_defined
()
==
False
assert
record
.
is_
affiliation_for_all
()
==
False
def
test_is_proceeding
(
record
):
...
...
tests/harvester/Record/test_phd_cds1632177.py
View file @
6b8fe4f7
...
...
@@ -58,7 +58,7 @@ def test_institutes(record):
assert
institutes
[
0
]
==
"Marseille, CPPM"
assert
institutes
[
1
]
==
"Shandong U."
assert
record
.
is_
institute_defined
()
==
True
assert
record
.
is_
affiliation_for_all
()
==
True
def
test_is_phd
(
record
):
...
...
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