forked from inspirehep/invenio-records
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jiri Kuncar <[email protected]>
- Loading branch information
1 parent
db5889f
commit baeae28
Showing
4 changed files
with
14 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,10 +29,6 @@ | |
|
||
from dojson.contrib.marc21.utils import create_record, split_blob | ||
|
||
from invenio_documents.models import Document | ||
|
||
from invenio_record.models import Record | ||
|
||
from invenio_testing import InvenioTestCase | ||
|
||
from mock import patch | ||
|
@@ -47,7 +43,7 @@ def test_records_created(self): | |
xmlpath = os.path.join(os.path.dirname(__file__), 'data', | ||
'demo_record_marc_data.xml') | ||
with open(xmlpath, 'r') as xmltext: | ||
recs = [record for record in split_blob(xmltext)] | ||
recs = [record for record in split_blob(xmltext.read())] | ||
assert len(recs) == 142 | ||
|
||
def test_accented_unicode_letterst_test(self): | ||
|
@@ -93,6 +89,7 @@ class TestLegacyExport(InvenioTestCase): | |
def test_legacy_export_marcxml(self): | ||
"""Record - legacy export marxml.""" | ||
# FIXME: use a better way to compare | ||
from invenio_record.models import Record | ||
from invenio.legacy.bibrecord import create_record, records_identical | ||
blob = ''' | ||
<record> | ||
|
@@ -121,6 +118,7 @@ def test_legacy_export_marcxml(self): | |
|
||
def test_legacy_create_recstruct(self): | ||
"""Record - create recstruct.""" | ||
from invenio_record.models import Record | ||
from invenio.legacy.bibrecord import create_record, records_identical | ||
|
||
blob = ''' | ||
|
@@ -521,6 +519,7 @@ def setUp(self): | |
def test_restricted_record_non_restricted_document( | ||
self, check_user_can_view_record_patch): | ||
"""Record - Restrcited access to record documents.""" | ||
from invenio_documents.models import Document | ||
d = Document.create({'title': 'Document 1', | ||
'description': 'Testing 1', | ||
'restriction': {'email': '[email protected]'}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters