1
|
# coding: utf-8
|
2
|
|
3
|
from __future__ import absolute_import
|
4
|
|
5
|
from swagger_server.models.error import Error
|
6
|
from swagger_server.models.scholix import Scholix
|
7
|
from . import BaseTestCase
|
8
|
from six import BytesIO
|
9
|
from flask import json
|
10
|
|
11
|
|
12
|
class TestScholixController(BaseTestCase):
|
13
|
""" ScholixController integration test stubs """
|
14
|
|
15
|
def test_links_from_datasource_get(self):
|
16
|
"""
|
17
|
Test case for links_from_datasource_get
|
18
|
|
19
|
Get all scholix relation collected from a datasource
|
20
|
"""
|
21
|
query_string = [('datasource', 'datasource_example'),
|
22
|
('page', 56)]
|
23
|
response = self.client.open('/v1/linksFromDatasource',
|
24
|
method='GET',
|
25
|
query_string=query_string)
|
26
|
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
|
27
|
|
28
|
def test_links_from_pid_get(self):
|
29
|
"""
|
30
|
Test case for links_from_pid_get
|
31
|
|
32
|
Retrieve all scholix links from a persistent identifier
|
33
|
"""
|
34
|
query_string = [('pid', 'pid_example'),
|
35
|
('pidType', 'pidType_example'),
|
36
|
('typologyTarget', 'typologyTarget_example'),
|
37
|
('datasourceTarget', 'datasourceTarget_example'),
|
38
|
('page', 56)]
|
39
|
response = self.client.open('/v1/linksFromPid',
|
40
|
method='GET',
|
41
|
query_string=query_string)
|
42
|
self.assert200(response, "Response body is : " + response.data.decode('utf-8'))
|
43
|
|
44
|
|
45
|
if __name__ == '__main__':
|
46
|
import unittest
|
47
|
unittest.main()
|