Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
6d568a27
Commit
6d568a27
authored
6 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add IIIF manifest validation using Tripoli
parent
c463c32f
No related branches found
Branches containing commit
Tags
1.2.0-rc1
Tags containing commit
1 merge request
!15
IIIF manifest validation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
requirements.txt
+1
-0
1 addition, 0 deletions
requirements.txt
src/documents/tests.py
+9
-0
9 additions, 0 deletions
src/documents/tests.py
with
10 additions
and
0 deletions
requirements.txt
+
1
−
0
View file @
6d568a27
...
...
@@ -17,3 +17,4 @@ requests==2.18.4
roman
==2.0.0
urllib3
==1.22
ijson
==2.3
tripoli
==2.0.0
This diff is collapsed.
Click to expand it.
src/documents/tests.py
+
9
−
0
View file @
6d568a27
...
...
@@ -2,6 +2,7 @@ from django.test import TestCase
from
django.urls
import
reverse
from
rest_framework.test
import
APITestCase
from
rest_framework
import
status
from
tripoli
import
IIIFValidator
from
documents.models
import
Document
,
DocumentLink
,
DocumentType
,
Page
from
images.models
import
ImageServer
,
Image
...
...
@@ -145,3 +146,11 @@ class TestVolumeManifestSerializer(APITestCase):
self
.
assertEqual
(
len
(
topstruct
[
'
ranges
'
]),
0
)
self
.
assertEqual
(
len
(
manifest
[
'
sequences
'
]),
1
)
self
.
assertEqual
(
len
(
manifest
[
'
sequences
'
][
0
][
'
canvases
'
]),
0
)
def
test_normal_manifest_iiif_validation
(
self
):
response
=
self
.
client
.
get
(
reverse
(
'
api:volume-manifest
'
,
kwargs
=
{
'
pk
'
:
self
.
vol
.
id
}))
self
.
assertEqual
(
response
.
status_code
,
status
.
HTTP_200_OK
)
manifest
=
response
.
json
()
iv
=
IIIFValidator
()
iv
.
validate
(
manifest
)
assert
iv
.
is_valid
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