Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
catalogue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labs-team
catalogue
Commits
26adb001
Commit
26adb001
authored
6 years ago
by
gabriele-h
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for almasru, fix imports all tests
parent
a39ad4ed
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
marc_tools/tests/test_marc_extractor.py
+1
-1
1 addition, 1 deletion
marc_tools/tests/test_marc_extractor.py
sru/tests/error.xml
+9
-0
9 additions, 0 deletions
sru/tests/error.xml
sru/tests/test_almasru.py
+12
-0
12 additions, 0 deletions
sru/tests/test_almasru.py
with
22 additions
and
1 deletion
marc_tools/tests/test_marc_extractor.py
+
1
−
1
View file @
26adb001
import
pytest
import
marc_extractor
import
marc_tools.marc_extractor
as
marc_extractor
class
TestConstructSingleCommand
:
...
...
This diff is collapsed.
Click to expand it.
sru/tests/error.xml
0 → 100644
+
9
−
0
View file @
26adb001
<?xml version="1.0" encoding="UTF-8"?>
<searchRetrieveResponse
xmlns=
"http://www.loc.gov/zing/srw/"
xmlns:diag=
"http://www.loc.gov/zing/srw/diagnostic/"
>
<version>
1.2
</version>
<diagnostics>
<diag:diagnostic>
<diag:uri>
200801
</diag:uri>
<diag:message>
Catalog search has encountered an error
</diag:message>
</diag:diagnostic>
</diagnostics>
</searchRetrieveResponse>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
sru/tests/test_almasru.py
0 → 100644
+
12
−
0
View file @
26adb001
import
pytest
import
sru.almasru
as
almasru
retriever
=
almasru
.
RecordRetriever
(
'
obv-at-oenb
'
,
'
43ACC_ONB
'
,
'
marcxml
'
)
class
TestRecordRetriever
:
def
test_erroneous_xml
(
self
):
with
pytest
.
raises
(
almasru
.
SruException
):
retriever
.
by_mms_id
(
'
MMS-ID
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment