[Python-modules-commits] [python-pyld] 183/276: Use filename extension for content type if not provided; bug fixes.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:48:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-pyld.
commit 1875ad0c8e485a0b6ec4747be34177951273357a
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Tue Sep 10 10:43:22 2013 -0400
Use filename extension for content type if not provided; bug fixes.
---
tests/runtests.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/runtests.py b/tests/runtests.py
index f275fcf..d31bbce 100644
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -269,9 +269,11 @@ def create_document_loader(test):
options['redirectTo'])
elif 'httpLink' in options:
content_type = options.get('contentType')
+ if not content_type and url.endswith('.jsonld'):
+ content_type = 'application/ld+json'
link_header = options.get('httpLink', '')
if isinstance(link_header, list):
- ','.join(link_header)
+ link_header = ','.join(link_header)
link_header = jsonld.parse_link_header(
link_header).get('http://www.w3.org/ns/json-ld#context')
if link_header and content_type != 'application/ld+json':
@@ -290,8 +292,9 @@ def create_document_loader(test):
def local_loader(url):
# always load remote-doc and non-base tests remotely
- if 'remote-doc' in url or not url.startswith(base):
- return loader(url)
+ #if (not url.startswith(base) or
+ # test.manifest.data.get('name') == 'Remote document'):
+ # return loader(url)
# attempt to load locally
return load_locally(url)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git
More information about the Python-modules-commits
mailing list