-
Notifications
You must be signed in to change notification settings - Fork 3
/
TestConstants.py
52 lines (43 loc) · 1.81 KB
/
TestConstants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CONFIG_FILE_PARAM = "config_file"
SITE_NAME_PARAM = "site_name"
BASE_URL_PARAM = "baseurl"
ADMIN_USER_PARAM = "admin_user"
ADMIN_PASS_PARAM = "admin_password"
USER_NAME_PARAM = "user1"
USER_PASS_PARAM = "password1"
USER2_NAME_PARAM = "user2"
USER2_PASS_PARAM = "password2"
LOG_FILE_PARAM = "logfile"
SELECTED_TESTS_PARAM = "selected_tests"
# Via RFC 7231 3.3
PAYLOAD_HEADERS = ['Content-Length', 'Content-Range', 'Trailer', 'Transfer-Encoding']
# Fedora specific constants
FCR_VERSIONS = "fcr:versions"
FCR_FIXITY = "fcr:fixity"
SERVER_MANAGED = "http://fedora.info/definitions/v4/repository#ServerManaged"
INBOUND_REFERENCE = "http://fedora.info/definitions/v4/repository#InboundReferences"
EMBEDED_RESOURCE = "http://fedora.info/definitions/v4/repository#EmbedResources"
GET_PREFER_MINIMAL = "return=minimal"
PUT_PREFER_LENIENT = "handling=lenient; received=\"minimal\""
# This is used with the make_prefer_header() function in abstract_fedora_tests
PREFER_PATTERN = "return=representation; {0}=\"{1}\""
RFC_1123_FORMAT = "%a, %d %b %Y %H:%M:%S GMT"
# General Mime and LDP constants
JSONLD_MIMETYPE = "application/ld+json"
SPARQL_UPDATE_MIMETYPE = "application/sparql-update"
LDP_NS = "http://www.w3.org/ns/ldp#"
LDP_CONTAINER = LDP_NS + "Container"
LDP_BASIC = LDP_NS + "BasicContainer"
LDP_DIRECT = LDP_NS + "DirectContainer"
LDP_INDIRECT = LDP_NS + "IndirectContainer"
LDP_RESOURCE = LDP_NS + "Resource"
LDP_NON_RDF_SOURCE = LDP_NS + "NonRDFSource"
MEMENTO_NS = "http://mementoweb.org/ns#"
MEM_ORIGINAL_RESOURCE = MEMENTO_NS + "OriginalResource"
MEM_TIMEGATE = MEMENTO_NS + "TimeGate"
MEM_TIMEMAP = MEMENTO_NS + "TimeMap"
# Test constructs
OBJECT_TTL = "@prefix dc: <http://purl.org/dc/elements/1.1/> ." \
"@prefix pcdm: <http://pcdm.org/models#> ." \
"<> a pcdm:Object ;" \
"dc:title \"An Object\" ."