fix CITE test A.4.4.7 (#200)

* fix CITE test A.4.4.7

* fix CITE test A.4.4.7
This commit is contained in:
Tom Kralidis
2019-06-30 10:29:45 -04:00
committed by GitHub
parent a757b4d964
commit 1b90b93d21
2 changed files with 16 additions and 15 deletions
+15 -14
View File
@@ -330,20 +330,21 @@ class API(object):
fcm['collections'].append(collection)
fcm['links'].append({
'type': 'application/json',
'rel': 'self',
'title': 'This document as JSON',
'href': '{}/collections?f=json'.format(
self.config['server']['url'])
})
fcm['links'].append({
'type': 'text/html',
'rel': 'alternate',
'title': 'This document as HTML',
'href': '{}/collections?f=html'.format(
self.config['server']['url'])
})
if dataset is None:
fcm['links'].append({
'type': 'application/json',
'rel': 'self',
'title': 'This document as JSON',
'href': '{}/collections?f=json'.format(
self.config['server']['url'])
})
fcm['links'].append({
'type': 'text/html',
'rel': 'alternate',
'title': 'This document as HTML',
'href': '{}/collections?f=html'.format(
self.config['server']['url'])
})
if format_ == 'html': # render
fcm['links'][0]['rel'] = 'alternate'
+1 -1
View File
@@ -166,7 +166,7 @@ def test_describe_collections(config, api_):
assert collection['name'] == 'obs'
assert collection['title'] == 'Observations'
assert collection['description'] == 'Observations'
assert len(collection['links']) == 8
assert len(collection['links']) == 6
rsp_headers, code, response = api_.describe_collections(
req_headers, {'f': 'html'}, 'obs')