diff --git a/dev-requirements.txt b/dev-requirements.txt index 56a550ae8..ab44a1aef 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,5 @@ black==21.12b0 +bravado==11.0.3 bravado_core==5.17.0 flake8==4.0.1 isort==5.10.1 @@ -14,4 +15,4 @@ tox==3.24.5 WebTest==3.0.0 wheel==0.37.1 zest.releaser==6.22.2 -zope.sqlalchemy==1.6 \ No newline at end of file +zope.sqlalchemy==1.6 diff --git a/requirements.txt b/requirements.txt index a83bb4089..44c3bfb18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ cornice==6.0.1 cornice-swagger==1.0.1 dockerflow==2021.7.0 jsonpatch==1.32 -jsonschema==3.2.0 +jsonschema==4.4.0 logging-color-formatter==1.0.2 newrelic==7.2.4.171 psycopg2-binary==2.9.3 diff --git a/setup.cfg b/setup.cfg index 5a526ca1e..5a9c60a83 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ install_requires = cornice cornice_swagger dockerflow - jsonschema>=3.0.0 + jsonschema jsonpatch logging-color-formatter python-dateutil diff --git a/tests/openapi/support.py b/tests/openapi/support.py index cd3abf395..3332d402e 100644 --- a/tests/openapi/support.py +++ b/tests/openapi/support.py @@ -1,5 +1,6 @@ import unittest +from bravado.requests_client import RequestsClient from bravado_core.request import IncomingRequest, unmarshal_request from bravado_core.resource import build_resources from bravado_core.response import OutgoingResponse, validate_response @@ -22,6 +23,7 @@ def setUpClass(cls): super().setUpClass() cls.spec_dict = cls.app.get("/__api__").json bravado_config = { + # Use models (Python classes) instead of dicts for #/definitions/{models} # use_models causes us to break in bravado-core 4.13.0, # probably because of # https://github.com/Yelp/bravado-core/pull/254, and we @@ -29,7 +31,9 @@ def setUpClass(cls): # here anyhow. "use_models": False } - cls.spec = Spec.from_dict(cls.spec_dict, config=bravado_config) + cls.spec = Spec.from_dict( + cls.spec_dict, http_client=RequestsClient(), config=bravado_config + ) cls.resources = build_resources(cls.spec) @classmethod diff --git a/tox.ini b/tox.ini index ae38c96db..e7723bc63 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,7 @@ commands = python --version py.test {posargs} deps = + bravado bravado_core pytest pytest-cache