-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""Unit tests for schemat.py.""" | ||
|
||
import unittest | ||
import util | ||
|
||
|
||
class TestInit(unittest.TestCase): | ||
def test_set_up_schemathesis(self): | ||
"""Test set_up_schemathesis.""" | ||
__version__ = "testversion" | ||
|
||
util.args = util.parse_args([], __version__) | ||
util.args.openapi_version == "3.1" | ||
|
||
util.logger = util.set_up_logging( | ||
args=util.args, logfile=util.args.log_file, version=__version__ | ||
) | ||
import schemat | ||
|
||
schemat.schema = schemat.set_up_schemathesis(util.args) | ||
self.assertTrue(schemat.schema) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"title": "Example API Landing Page", | ||
"description": "This is an example of an API landing page in JSON format", | ||
"attribution": "<a href='www.ign.es' rel=' '>IGN</a> <a href='www.govdata.de/dl-de/by-2-0'>(c)</a>", | ||
"links": [ | ||
{ | ||
"rel": "service-desc", | ||
"type": "application/json", | ||
"title": "API definition for this endpoint as JSON", | ||
"href": "http://www.example.com/oapi-c/api?f=application/json" | ||
}, | ||
{ | ||
"rel": "service-desc", | ||
"type": "text/html", | ||
"title": "API definition for this endpoint as HTML", | ||
"href": "https://edrisobaric.k8s.met.no/docs" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/data-meta", | ||
"type": "application/xml", | ||
"title": "ISO 19115 Metadata as XML", | ||
"href": "http://www.example.com/oapi-c/data-meta?f=application/xml" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance", | ||
"type": "application/json", | ||
"title": "Conformance Declaration as JSON", | ||
"href": "http://www.example.com/oapi-c/conformance?f=application/json" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance", | ||
"type": "application/xml", | ||
"title": "Conformance Declaration as XML", | ||
"href": "http://www.example.com/oapi-c/conformance?f=application/xml" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/conformance", | ||
"type": "text/html", | ||
"title": "Conformance Declaration as HTML", | ||
"href": "http://www.example.com/oapi-c/conformance?f=text/html" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/data", | ||
"type": "application/json", | ||
"title": "Collections Metadata as JSON", | ||
"href": "http://www.example.com/oapi-c/collections?f=application/json" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/data", | ||
"type": "application/xml", | ||
"title": "Collections Metadata as XML", | ||
"href": "http://www.example.com/oapi-c/collections?f=application/xml" | ||
}, | ||
{ | ||
"rel": "http://www.opengis.net/def/rel/ogc/1.0/data", | ||
"type": "text/html", | ||
"title": "Collections Metadata as HTML", | ||
"href": "http://www.example.com/oapi-c/collections?f=text/html" | ||
}, | ||
{ | ||
"rel": "self", | ||
"type": "application/json", | ||
"title": "This Document", | ||
"href": "http://www.example.com/oapi-c?f=application/json" | ||
}, | ||
{ | ||
"rel": "alternate", | ||
"type": "application/xml", | ||
"title": "This Document as XML", | ||
"href": "http://www.example.com/oapi-c?f=application/xml" | ||
}, | ||
{ | ||
"rel": "alternate", | ||
"type": "text/html", | ||
"title": "This Document as HTML", | ||
"href": "http://www.example.com/oapi-c?f=text/html" | ||
} | ||
] | ||
} |