Repository: FireTail-io/firetail-py-lib (language: python)

Issue:
Update/python black
Quality of life improvement
- running black
- running isort
- adding black as pre-commit
Update/python black
Quality of life improvement
- running black
- running isort
- adding black as pre-commit


Discussion / hints:

Fix patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..ae2a07c
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,10 @@
+repos:
+-   repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v2.3.0
+    hooks:
+    -   id: trailing-whitespace
+-   repo: https://github.com/psf/black
+    rev: 22.10.0
+    hooks:
+    -   id: black
+        args: [--line-length=120]
diff --git a/dev-requirements.txt b/dev-requirements.txt
new file mode 100644
index 0000000..416634f
--- /dev/null
+++ b/dev-requirements.txt
@@ -0,0 +1,1 @@
+pre-commit
diff --git a/docs/conf.py b/docs/conf.py
index 3201e4d..856b2c8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -29,43 +29,43 @@
 # ones.
 import firetail
 
-extensions = ['autoapi.extension']
-
-autoapi_type = 'python'
-autoapi_options = ['members',
-                   'inherited-members',
-                   'undoc-members',
-                   'show-inheritance',
-                   'show-module-summary',
-                   'special-members',
-                   'imported-members']
-autoapi_python_class_content = 'both'
-autoapi_dirs = [
-    '../firetail'
+extensions = ["autoapi.extension"]
+
+autoapi_type = "python"
+autoapi_options = [
+    "members",
+    "inherited-members",
+    "undoc-members",
+    "show-inheritance",
+    "show-module-summary",
+    "special-members",
+    "imported-members",
 ]
+autoapi_python_class_content = "both"
+autoapi_dirs = ["../firetail"]
 
 # Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
 
 # The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ".rst"
 
 # The encoding of source files.
 # source_encoding = 'utf-8-sig'
 
 # The master toctree document.
-master_doc = 'index'
+master_doc = "index"
 
 # General information about the project.
-project = 'Firetail'
-copyright = '2022, Point Security Inc DBA FireTail (TM)'
+project = "Firetail"
+copyright = "2022, Point Security Inc DBA FireTail (TM)"
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = firetail.__version__.rsplit('.', 1)[0]
+version = firetail.__version__.rsplit(".", 1)[0]
 # The full version, including alpha/beta/rc tags.
 release = firetail.__version__
 
@@ -81,7 +81,7 @@
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ['_build']
+exclude_patterns = ["_build"]
 
 # The reST default role (used for this markup: `text`) to use for all
 # documents.
@@ -99,7 +99,7 @@
 # show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = "sphinx"
 
 # A list of ignored prefixes for module index sorting.
 # modindex_common_prefix = []
@@ -197,7 +197,7 @@
 # html_file_suffix = None
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'Firetaildoc'
+htmlhelp_basename = "Firetaildoc"
 
 
 # -- Options for LaTeX output ---------------------------------------------
@@ -205,10 +205,8 @@
 latex_elements = {
     # The paper size ('letterpaper' or 'a4paper').
     # 'papersize': 'letterpaper',
-
     # The font size ('10pt', '11pt' or '12pt').
     # 'pointsize': '10pt',
-
     # Additional stuff for the LaTeX preamble.
     # 'preamble': '',
 }
@@ -217,8 +215,7 @@
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-    ('index', 'Firetail.tex', 'Firetail Documentation',
-     'Point Security Inc DBA FireTail (TM)', 'manual'),
+    ("index", "Firetail.tex", "Firetail Documentation", "Point Security Inc DBA FireTail (TM)", "manual"),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -246,10 +243,7 @@
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
-man_pages = [
-    ('index', 'firetail', 'Firetail Documentation',
-     ['Point Security Inc DBA FireTail (TM)'], 1)
-]
+man_pages = [("index", "firetail", "Firetail Documentation", ["Point Security Inc DBA FireTail (TM)"], 1)]
 
 # If true, show URL addresses after external links.
 # man_show_urls = False
@@ -261,9 +255,15 @@
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-    ('index', 'Firetail', 'Firetail Documentation',
-     'Point Security Inc DBA FireTail (TM)', 'Firetail', 'One line description of project.',
-     'Miscellaneous'),
+    (
+        "index",
+        "Firetail",
+        "Firetail Documentation",
+        "Point Security Inc DBA FireTail (TM)",
+        "Firetail",
+        "One line description of project.",
+        "Miscellaneous",
+    ),
 ]
 
 # Documents to append as an appendix to all manuals.
diff --git a/examples/openapi3/apikey/app.py b/examples/openapi3/apikey/app.py
index 150308a..d78eb30 100644
--- a/examples/openapi3/apikey/app.py
+++ b/examples/openapi3/apikey/app.py
@@ -1,23 +1,19 @@
 #!/usr/bin/env python3
-'''
+"""
 Basic example of a resource server
-'''
+"""
 
 import firetail
 from firetail.exceptions import OAuthProblem
 
-TOKEN_DB = {
-    'asdf1234567890': {
-        'uid': 100
-    }
-}
+TOKEN_DB = {"asdf1234567890": {"uid": 100}}
 
 
 def apikey_auth(token, required_scopes):
     info = TOKEN_DB.get(token, None)
 
     if not info:
-        raise OAuthProblem('Invalid token')
+        raise OAuthProblem("Invalid token")
 
     return info
 
@@ -26,7 +22,7 @@ def get_secret(user) -> str:
     return f"You are {user} and the secret is 'wbevuec'"
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('openapi.yaml')
+    app.add_api("openapi.yaml")
     app.run(port=8080)
diff --git a/examples/openapi3/basicauth/app.py b/examples/openapi3/basicauth/app.py
index ca28a41..bb9a18e 100644
--- a/examples/openapi3/basicauth/app.py
+++ b/examples/openapi3/basicauth/app.py
@@ -1,19 +1,16 @@
 #!/usr/bin/env python3
-'''
+"""
 Basic example of a resource server
-'''
+"""
 
 import firetail
 
-PASSWD = {
-    'admin': 'secret',
-    'foo': 'bar'
-}
+PASSWD = {"admin": "secret", "foo": "bar"}
 
 
 def basic_auth(username, password):
     if PASSWD.get(username) == password:
-        return {'sub': username}
+        return {"sub": username}
     # optional: raise exception for custom error response
     return None
 
@@ -22,7 +19,7 @@ def get_secret(user) -> str:
     return f"You are {user} and the secret is 'wbevuec'"
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('openapi.yaml')
+    app.add_api("openapi.yaml")
     app.run(port=8080)
diff --git a/examples/openapi3/enforcedefaults_aiohttp/enforcedefaults.py b/examples/openapi3/enforcedefaults_aiohttp/enforcedefaults.py
index 6d33a6f..a95f383 100755
--- a/examples/openapi3/enforcedefaults_aiohttp/enforcedefaults.py
+++ b/examples/openapi3/enforcedefaults_aiohttp/enforcedefaults.py
@@ -13,19 +13,18 @@ async def echo(body):
 
 # via https://python-jsonschema.readthedocs.io/
 def extend_with_set_default(validator_class):
-    validate_properties = validator_class.VALIDATORS['properties']
+    validate_properties = validator_class.VALIDATORS["properties"]
 
     def set_defaults(validator, properties, instance, schema):
         for property, subschema in six.iteritems(properties):
-            if 'default' in subschema:
-                instance.setdefault(property, subschema['default'])
+            if "default" in subschema:
+                instance.setdefault(property, subschema["default"])
 
-        for error in validate_properties(
-                validator, properties, instance, schema):
+        for error in validate_properties(validator, properties, instance, schema):
             yield error
 
-    return jsonschema.validators.extend(
-        validator_class, {'properties': set_defaults})
+    return jsonschema.validators.extend(validator_class, {"properties": set_defaults})
+
 
 DefaultsEnforcingDraft4Validator = extend_with_set_default(Draft4RequestValidator)
 
@@ -33,24 +32,18 @@ def set_defaults(validator, properties, instance, schema):
 class DefaultsEnforcingRequestBodyValidator(RequestBodyValidator):
     def __init__(self, *args, **kwargs):
         super(DefaultsEnforcingRequestBodyValidator, self).__init__(
-            *args, validator=DefaultsEnforcingDraft4Validator, **kwargs)
+            *args, validator=DefaultsEnforcingDraft4Validator, **kwargs
+        )
 
 
-validator_map = {
-    'body': DefaultsEnforcingRequestBodyValidator
-}
+validator_map = {"body": DefaultsEnforcingRequestBodyValidator}
 
 
-if __name__ == '__main__':
-    app = firetail.AioHttpApp(
-        __name__,
-        port=8080,
-        specification_dir='.',
-        options={'swagger_ui': True}
-    )
+if __name__ == "__main__":
+    app = firetail.AioHttpApp(__name__, port=8080, specification_dir=".", options={"swagger_ui": True})
     app.add_api(
-        'enforcedefaults-api.yaml',
-        arguments={'title': 'Hello World Example'},
+        "enforcedefaults-api.yaml",
+        arguments={"title": "Hello World Example"},
         validator_map=validator_map,
     )
     app.run()
diff --git a/examples/openapi3/helloworld/hello.py b/examples/openapi3/helloworld/hello.py
index 2fbbaea..e403bd2 100644
--- a/examples/openapi3/helloworld/hello.py
+++ b/examples/openapi3/helloworld/hello.py
@@ -4,12 +4,10 @@
 
 
 def post_greeting(name: str) -> str:
-    return f'Hello {name}'
+    return f"Hello {name}"
 
 
-if __name__ == '__main__':
-    app = firetail.FlaskApp(
-        __name__, port=9090, specification_dir='openapi/')
-    app.add_api('helloworld-api.yaml',
-                arguments={'title': 'Hello World Example'})
+if __name__ == "__main__":
+    app = firetail.FlaskApp(__name__, port=9090, specification_dir="openapi/")
+    app.add_api("helloworld-api.yaml", arguments={"title": "Hello World Example"})
     app.run()
diff --git a/examples/openapi3/helloworld_aiohttp/hello.py b/examples/openapi3/helloworld_aiohttp/hello.py
index 2eb5e58..ed96270 100755
--- a/examples/openapi3/helloworld_aiohttp/hello.py
+++ b/examples/openapi3/helloworld_aiohttp/hello.py
@@ -5,10 +5,10 @@
 
 
 async def post_greeting(name):
-    return web.Response(text=f'Hello {name}')
+    return web.Response(text=f"Hello {name}")
 
 
-if __name__ == '__main__':
-    app = firetail.AioHttpApp(__name__, port=9090, specification_dir='openapi/')
-    app.add_api('helloworld-api.yaml', arguments={'title': 'Hello World Example'})
+if __name__ == "__main__":
+    app = firetail.AioHttpApp(__name__, port=9090, specification_dir="openapi/")
+    app.add_api("helloworld-api.yaml", arguments={"title": "Hello World Example"})
     app.run()
diff --git a/examples/openapi3/jwt/app.py b/examples/openapi3/jwt/app.py
index 55efacb..3848612 100644
--- a/examples/openapi3/jwt/app.py
+++ b/examples/openapi3/jwt/app.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
-'''
+"""
 Basic example of a resource server
-'''
+"""
 
 import time
 
@@ -9,10 +9,10 @@
 from jose import JWTError, jwt
 from werkzeug.exceptions import Unauthorized
 
-JWT_ISSUER = 'io.firetail.firetail'
-JWT_SECRET = 'change_this'
+JWT_ISSUER = "io.firetail.firetail"
+JWT_SECRET = "change_this"
 JWT_LIFETIME_SECONDS = 600
-JWT_ALGORITHM = 'HS256'
+JWT_ALGORITHM = "HS256"
 
 
 def generate_token(user_id):
@@ -35,17 +35,19 @@ def decode_token(token):
 
 
 def get_secret(user, token_info) -> str:
-    return '''
+    return """
     You are user_id {user} and the secret is 'wbevuec'.
     Decoded token claims: {token_info}.
-    '''.format(user=user, token_info=token_info)
+    """.format(
+        user=user, token_info=token_info
+    )
 
 
 def _current_timestamp() -> int:
     return int(time.time())
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('openapi.yaml')
+    app.add_api("openapi.yaml")
     app.run(port=8080)
diff --git a/examples/openapi3/methodresolver/api/petsview.py b/examples/openapi3/methodresolver/api/petsview.py
index 3bdbf03..8b2d884 100644
--- a/examples/openapi3/methodresolver/api/petsview.py
+++ b/examples/openapi3/methodresolver/api/petsview.py
@@ -6,8 +6,8 @@
 
 
 class PetsView(MethodView):
-    """ Create Pets service
-    """
+    """Create Pets service"""
+
     method_decorators = []
     pets = {}
 
@@ -17,11 +17,11 @@ def post(self):
         tag = body.get("tag")
         count = len(self.pets)
         pet = {}
-        pet['id'] = count + 1
+        pet["id"] = count + 1
         pet["tag"] = tag
         pet["name"] = name
-        pet['last_updated'] = datetime.datetime.now()
-        self.pets[pet['id']] = pet
+        pet["last_updated"] = datetime.datetime.now()
+        self.pets[pet["id"]] = pet
         return pet, 201
 
     def put(self, petId):
@@ -32,7 +32,7 @@ def put(self, petId):
         pet = self.pets.get(petId, {"id": id_})
         pet["name"] = name
         pet["tag"] = tag
-        pet['last_updated'] = datetime.datetime.now()
+        pet["last_updated"] = datetime.datetime.now()
         self.pets[id_] = pet
         return self.pets[id_], 201
 
diff --git a/examples/openapi3/methodresolver/app.py b/examples/openapi3/methodresolver/app.py
index 416f765..13b089f 100644
--- a/examples/openapi3/methodresolver/app.py
+++ b/examples/openapi3/methodresolver/app.py
@@ -6,13 +6,16 @@
 
 logging.basicConfig(level=logging.INFO)
 
-if __name__ == '__main__':
-    app = firetail.FlaskApp(
-        __name__, specification_dir='openapi/', debug=True)
+if __name__ == "__main__":
+    app = firetail.FlaskApp(__name__, specification_dir="openapi/", debug=True)
 
     options = {"swagger_ui": True}
-    app.add_api('pets-api.yaml',
-                options=options,
-                arguments={'title': 'MethodViewResolver Example'},
-                resolver=MethodViewResolver('api'), strict_validation=True, validate_responses=True)
+    app.add_api(
+        "pets-api.yaml",
+        options=options,
+        arguments={"title": "MethodViewResolver Example"},
+        resolver=MethodViewResolver("api"),
+        strict_validation=True,
+        validate_responses=True,
+    )
     app.run(port=9090)
diff --git a/examples/openapi3/restyresolver/api/pets.py b/examples/openapi3/restyresolver/api/pets.py
index 43ccf73..12a0218 100644
--- a/examples/openapi3/restyresolver/api/pets.py
+++ b/examples/openapi3/restyresolver/api/pets.py
@@ -10,11 +10,11 @@ def post(body):
     tag = body.get("tag")
     count = len(pets)
     pet = {}
-    pet['id'] = count + 1
+    pet["id"] = count + 1
     pet["tag"] = tag
     pet["name"] = name
-    pet['last_updated'] = datetime.datetime.now()
-    pets[pet['id']] = pet
+    pet["last_updated"] = datetime.datetime.now()
+    pets[pet["id"]] = pet
     return pet, 201
 
 
@@ -26,7 +26,7 @@ def put(body):
     pet = pets.get(id_, {"id": id_})
     pet["name"] = name
     pet["tag"] = tag
-    pet['last_updated'] = datetime.datetime.now()
+    pet["last_updated"] = datetime.datetime.now()
     pets[id_] = pet
     return pets[id_]
 
diff --git a/examples/openapi3/restyresolver/resty.py b/examples/openapi3/restyresolver/resty.py
index 0334d72..f81c57a 100644
--- a/examples/openapi3/restyresolver/resty.py
+++ b/examples/openapi3/restyresolver/resty.py
@@ -6,9 +6,7 @@
 
 logging.basicConfig(level=logging.INFO)
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('resty-api.yaml',
-                arguments={'title': 'RestyResolver Example'},
-                resolver=RestyResolver('api'))
+    app.add_api("resty-api.yaml", arguments={"title": "RestyResolver Example"}, resolver=RestyResolver("api"))
     app.run(port=9090)
diff --git a/examples/openapi3/reverseproxy/app.py b/examples/openapi3/reverseproxy/app.py
index bb644c3..f6e7184 100644
--- a/examples/openapi3/reverseproxy/app.py
+++ b/examples/openapi3/reverseproxy/app.py
@@ -1,12 +1,12 @@
 #!/usr/bin/env python3
-'''
+"""
 example of firetail running behind a path-altering reverse-proxy
 
 NOTE this demo is not secure by default!!
 You'll want to make sure these headers are coming from your proxy, and not
 directly from users on the web!
 
-'''
+"""
 import logging
 
 import firetail
@@ -14,7 +14,7 @@
 
 # adapted from http://flask.pocoo.org/snippets/35/
 class ReverseProxied:
-    '''Wrap the application in this middleware and configure the
+    """Wrap the application in this middleware and configure the
     reverse proxy to add these headers, to let you quietly bind
     this to a URL other than / and to an HTTP scheme that is
     different than what is used locally.
@@ -33,7 +33,7 @@ class ReverseProxied:
     :param script_name: override the default script name (path)
     :param scheme: override the default scheme
     :param server: override the default server
-    '''
+    """
 
     def __init__(self, app, script_name=None, scheme=None, server=None):
         self.app = app
@@ -47,20 +47,19 @@ def __call__(self, environ, start_response):
             "You'll want to make sure these headers are coming from your proxy, "
             "and not directly from users on the web!"
         )
-        script_name = environ.get(
-            'HTTP_X_FORWARDED_PATH', '') or self.script_name
+        script_name = environ.get("HTTP_X_FORWARDED_PATH", "") or self.script_name
         if script_name:
-            environ['SCRIPT_NAME'] = "/" + script_name.lstrip("/")
-            path_info = environ['PATH_INFO']
+            environ["SCRIPT_NAME"] = "/" + script_name.lstrip("/")
+            path_info = environ["PATH_INFO"]
             if path_info.startswith(script_name):
-                environ['PATH_INFO_OLD'] = path_info
-                environ['PATH_INFO'] = path_info[len(script_name):]
-        scheme = environ.get('HTTP_X_SCHEME', '') or self.scheme
+                environ["PATH_INFO_OLD"] = path_info
+                environ["PATH_INFO"] = path_info[len(script_name) :]
+        scheme = environ.get("HTTP_X_SCHEME", "") or self.scheme
         if scheme:
-            environ['wsgi.url_scheme'] = scheme
-        server = environ.get('HTTP_X_FORWARDED_SERVER', '') or self.server
+            environ["wsgi.url_scheme"] = scheme
+        server = environ.get("HTTP_X_FORWARDED_SERVER", "") or self.server
         if server:
-            environ['HTTP_HOST'] = server
+            environ["HTTP_HOST"] = server
         return self.app(environ, start_response)
 
 
@@ -68,13 +67,10 @@ def hello():
     return "hello"
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('openapi.yaml')
+    app.add_api("openapi.yaml")
     flask_app = app.app
-    proxied = ReverseProxied(
-        flask_app.wsgi_app,
-        script_name='/reverse_proxied/'
-    )
+    proxied = ReverseProxied(flask_app.wsgi_app, script_name="/reverse_proxied/")
     flask_app.wsgi_app = proxied
     flask_app.run(port=8080)
diff --git a/examples/openapi3/reverseproxy_aiohttp/app.py b/examples/openapi3/reverseproxy_aiohttp/app.py
index 4fb9a19..f7815ab 100755
--- a/examples/openapi3/reverseproxy_aiohttp/app.py
+++ b/examples/openapi3/reverseproxy_aiohttp/app.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
-'''
+"""
 example of aiohttp firetail running behind a path-altering reverse-proxy
-'''
+"""
 
 import json
 import logging
@@ -16,7 +16,6 @@
 
 
 class XPathForwarded(XForwardedBase):
-
     def __init__(self, num=1):
         self._num = num
 
@@ -32,28 +31,28 @@ async def middleware(self, request, handler):
             "this demo is not secure by default!! "
             "You'll want to make sure these headers are coming from your proxy, "
             "and not directly from users on the web!"
-            )
+        )
         try:
             overrides = {}
             headers = request.headers
 
             forwarded_for = self.get_forwarded_for(headers)
             if forwarded_for:
-                overrides['remote'] = str(forwarded_for[-self._num])
+                overrides["remote"] = str(forwarded_for[-self._num])
 
             proto = self.get_forwarded_proto(headers)
             if proto:
-                overrides['scheme'] = proto[-self._num]
+                overrides["scheme"] = proto[-self._num]
 
             host = self.get_forwarded_host(headers)
             if host is not None:
-                overrides['host'] = host
+                overrides["host"] = host
 
             prefix = self.get_forwarded_path(headers)
             if prefix is not None:
-                prefix = '/' + prefix.strip('/') + '/'
-                request_path = URL(request.path.lstrip('/'))
-                overrides['rel_url'] = URL(prefix).join(request_path)
+                prefix = "/" + prefix.strip("/") + "/"
+                request_path = URL(request.path.lstrip("/"))
+                overrides["rel_url"] = URL(prefix).join(request_path)
 
             request = request.clone(**overrides)
 
@@ -64,18 +63,13 @@ async def middleware(self, request, handler):
 
 
 def hello(request):
-    ret = {
-        "host": request.host,
-        "scheme": request.scheme,
-        "path": request.path,
-        "_href": str(request.url)
-    }
+    ret = {"host": request.host, "scheme": request.scheme, "path": request.path, "_href": str(request.url)}
     return web.Response(text=json.dumps(ret), status=200)
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.AioHttpApp(__name__)
-    app.add_api('openapi.yaml', pass_context_arg_name='request')
+    app.add_api("openapi.yaml", pass_context_arg_name="request")
     aio = app.app
     reverse_proxied = XPathForwarded()
     aio.middlewares.append(reverse_proxied.middleware)
diff --git a/examples/openapi3/sqlalchemy/app.py b/examples/openapi3/sqlalchemy/app.py
index 39e8f10..33b6047 100644
--- a/examples/openapi3/sqlalchemy/app.py
+++ b/examples/openapi3/sqlalchemy/app.py
@@ -18,18 +18,18 @@ def get_pets(limit, animal_type=None):
 
 def get_pet(pet_id):
     pet = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
-    return pet.dump() if pet is not None else ('Not found', 404)
+    return pet.dump() if pet is not None else ("Not found", 404)
 
 
 def put_pet(pet_id, pet):
     p = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
-    pet['id'] = pet_id
+    pet["id"] = pet_id
     if p is not None:
-        logging.info('Updating pet %s..', pet_id)
+        logging.info("Updating pet %s..", pet_id)
         p.update(**pet)
     else:
-        logging.info('Creating pet %s..', pet_id)
-        pet['created'] = datetime.datetime.utcnow()
+        logging.info("Creating pet %s..", pet_id)
+        pet["created"] = datetime.datetime.utcnow()
         db_session.add(orm.Pet(**pet))
     db_session.commit()
     return NoContent, (200 if p is not None else 201)
@@ -38,7 +38,7 @@ def put_pet(pet_id, pet):
 def delete_pet(pet_id):
     pet = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
     if pet is not None:
-        logging.info('Deleting pet %s..', pet_id)
+        logging.info("Deleting pet %s..", pet_id)
         db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).delete()
         db_session.commit()
         return NoContent, 204
@@ -47,9 +47,9 @@ def delete_pet(pet_id):
 
 
 logging.basicConfig(level=logging.INFO)
-db_session = orm.init_db('sqlite:///:memory:')
+db_session = orm.init_db("sqlite:///:memory:")
 app = firetail.FlaskApp(__name__)
-app.add_api('openapi.yaml')
+app.add_api("openapi.yaml")
 
 application = app.app
 
@@ -59,5 +59,5 @@ def shutdown_session(exception=None):
     db_session.remove()
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app.run(port=8081, use_reloader=False, threaded=False)
diff --git a/examples/openapi3/sqlalchemy/orm.py b/examples/openapi3/sqlalchemy/orm.py
index c19bed8..16f5926 100644
--- a/examples/openapi3/sqlalchemy/orm.py
+++ b/examples/openapi3/sqlalchemy/orm.py
@@ -6,7 +6,7 @@
 
 
 class Pet(Base):
-    __tablename__ = 'pets'
+    __tablename__ = "pets"
     id = Column(String(20), primary_key=True)
     name = Column(String(100))
     animal_type = Column(String(20))
@@ -21,7 +21,7 @@ def update(self, id=None, name=None, animal_type=None, tags=None, created=None):
             self.created = created
 
     def dump(self):
-        return {k: v for k, v in vars(self).items() if not k.startswith('_')}
+        return {k: v for k, v in vars(self).items() if not k.startswith("_")}
 
 
 def init_db(uri):
diff --git a/examples/swagger2/basicauth/app.py b/examples/swagger2/basicauth/app.py
index b77c4f0..117fd81 100755
--- a/examples/swagger2/basicauth/app.py
+++ b/examples/swagger2/basicauth/app.py
@@ -1,26 +1,25 @@
 #!/usr/bin/env python3
-'''
+"""
 Basic example of a resource server
-'''
+"""
 
 import firetail
 
-PASSWD = {
-    'admin': 'secret',
-    'foo': 'bar'
-}
+PASSWD = {"admin": "secret", "foo": "bar"}
+
 
 def basic_auth(username, password):
     if PASSWD.get(username) == password:
-        return {'sub': username}
+        return {"sub": username}
     # optional: raise exception for custom error response
     return None
 
+
 def get_secret(user) -> str:
     return f"You are {user} and the secret is 'wbevuec'"
 
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('swagger.yaml')
+    app.add_api("swagger.yaml")
     app.run(port=8080)
diff --git a/examples/swagger2/enforcedefaults/enforcedefaults.py b/examples/swagger2/enforcedefaults/enforcedefaults.py
index 7ba8ddf..1558e83 100755
--- a/examples/swagger2/enforcedefaults/enforcedefaults.py
+++ b/examples/swagger2/enforcedefaults/enforcedefaults.py
@@ -12,35 +12,30 @@ def echo(data):
 
 # via https://python-jsonschema.readthedocs.io/
 def extend_with_set_default(validator_class):
-    validate_properties = validator_class.VALIDATORS['properties']
+    validate_properties = validator_class.VALIDATORS["properties"]
 
     def set_defaults(validator, properties, instance, schema):
         for property, subschema in properties.items():
-            if 'default' in subschema:
-                instance.setdefault(property, subschema['default'])
+            if "default" in subschema:
+                instance.setdefault(property, subschema["default"])
 
-        yield from validate_properties(
-                validator, properties, instance, schema)
+        yield from validate_properties(validator, properties, instance, schema)
+
+    return jsonschema.validators.extend(validator_class, {"properties": set_defaults})
 
-    return jsonschema.validators.extend(
-        validator_class, {'properties': set_defaults})
 
 DefaultsEnforcingDraft4Validator = extend_with_set_default(Draft4RequestValidator)
 
 
 class DefaultsEnforcingRequestBodyValidator(RequestBodyValidator):
     def __init__(self, *args, **kwargs):
-        super().__init__(
-            *args, validator=DefaultsEnforcingDraft4Validator, **kwargs)
+        super().__init__(*args, validator=DefaultsEnforcingDraft4Validator, **kwargs)
 
 
-validator_map = {
-    'body': DefaultsEnforcingRequestBodyValidator
-}
+validator_map = {"body": DefaultsEnforcingRequestBodyValidator}
 
 
-if __name__ == '__main__':
-    app = firetail.FlaskApp(
-        __name__, port=8080, specification_dir='.')
-    app.add_api('enforcedefaults-api.yaml', validator_map=validator_map)
+if __name__ == "__main__":
+    app = firetail.FlaskApp(__name__, port=8080, specification_dir=".")
+    app.add_api("enforcedefaults-api.yaml", validator_map=validator_map)
     app.run()
diff --git a/examples/swagger2/helloworld/hello.py b/examples/swagger2/helloworld/hello.py
index 8e1793e..b2e9019 100755
--- a/examples/swagger2/helloworld/hello.py
+++ b/examples/swagger2/helloworld/hello.py
@@ -4,9 +4,10 @@
 
 
 def post_greeting(name: str) -> str:
-    return f'Hello {name}'
+    return f"Hello {name}"
 
-if __name__ == '__main__':
-    app = firetail.FlaskApp(__name__, port=9090, specification_dir='swagger/')
-    app.add_api('helloworld-api.yaml', arguments={'title': 'Hello World Example'})
+
+if __name__ == "__main__":
+    app = firetail.FlaskApp(__name__, port=9090, specification_dir="swagger/")
+    app.add_api("helloworld-api.yaml", arguments={"title": "Hello World Example"})
     app.run()
diff --git a/examples/swagger2/restyresolver/api/pets.py b/examples/swagger2/restyresolver/api/pets.py
index d520e07..5151bc6 100644
--- a/examples/swagger2/restyresolver/api/pets.py
+++ b/examples/swagger2/restyresolver/api/pets.py
@@ -7,9 +7,9 @@
 
 def post(pet):
     count = len(pets)
-    pet['id'] = count + 1
-    pet['registered'] = datetime.datetime.now()
-    pets[pet['id']] = pet
+    pet["id"] = count + 1
+    pet["registered"] = datetime.datetime.now()
+    pets[pet["id"]] = pet
     return pet, 201
 
 
diff --git a/examples/swagger2/restyresolver/resty.py b/examples/swagger2/restyresolver/resty.py
index 42bfaa3..7bf3486 100755
--- a/examples/swagger2/restyresolver/resty.py
+++ b/examples/swagger2/restyresolver/resty.py
@@ -6,9 +6,7 @@
 
 logging.basicConfig(level=logging.INFO)
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     app = firetail.FlaskApp(__name__)
-    app.add_api('resty-api.yaml',
-                arguments={'title': 'RestyResolver Example'},
-                resolver=RestyResolver('api'))
+    app.add_api("resty-api.yaml", arguments={"title": "RestyResolver Example"}, resolver=RestyResolver("api"))
     app.run(port=9090)
diff --git a/examples/swagger2/sqlalchemy/app.py b/examples/swagger2/sqlalchemy/app.py
index 6a5be4a..b75baf7 100755
--- a/examples/swagger2/sqlalchemy/app.py
+++ b/examples/swagger2/sqlalchemy/app.py
@@ -18,18 +18,18 @@ def get_pets(limit, animal_type=None):
 
 def get_pet(pet_id):
     pet = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
-    return pet.dump() if pet is not None else ('Not found', 404)
+    return pet.dump() if pet is not None else ("Not found", 404)
 
 
 def put_pet(pet_id, pet):
     p = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
-    pet['id'] = pet_id
+    pet["id"] = pet_id
     if p is not None:
-        logging.info('Updating pet %s..', pet_id)
+        logging.info("Updating pet %s..", pet_id)
         p.update(**pet)
     else:
-        logging.info('Creating pet %s..', pet_id)
-        pet['created'] = datetime.datetime.utcnow()
+        logging.info("Creating pet %s..", pet_id)
+        pet["created"] = datetime.datetime.utcnow()
         db_session.add(orm.Pet(**pet))
     db_session.commit()
     return NoContent, (200 if p is not None else 201)
@@ -38,17 +38,18 @@ def put_pet(pet_id, pet):
 def delete_pet(pet_id):
     pet = db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).one_or_none()
     if pet is not None:
-        logging.info('Deleting pet %s..', pet_id)
+        logging.info("Deleting pet %s..", pet_id)
         db_session.query(orm.Pet).filter(orm.Pet.id == pet_id).delete()
         db_session.commit()
         return NoContent, 204
     else:
         return NoContent, 404
 
+
 logging.basicConfig(level=logging.INFO)
-db_session = orm.init_db('sqlite:///:memory:')
+db_session = orm.init_db("sqlite:///:memory:")
 app = firetail.FlaskApp(__name__)
-app.add_api('swagger.yaml')
+app.add_api("swagger.yaml")
 
 application = app.app
 
@@ -58,8 +59,5 @@ def shutdown_session(exception=None):
     db_session.remove()
 
 
-if __name__ == '__main__':
-    app.run(
-        port=8080,
-        threaded=False  # in-memory database isn't shared across threads
-    )
+if __name__ == "__main__":
+    app.run(port=8080, threaded=False)  # in-memory database isn't shared across threads
diff --git a/examples/swagger2/sqlalchemy/orm.py b/examples/swagger2/sqlalchemy/orm.py
index 1514032..42cb44c 100644
--- a/examples/swagger2/sqlalchemy/orm.py
+++ b/examples/swagger2/sqlalchemy/orm.py
@@ -6,7 +6,7 @@
 
 
 class Pet(Base):
-    __tablename__ = 'pets'
+    __tablename__ = "pets"
     id = Column(String(20), primary_key=True)
     name = Column(String(100))
     animal_type = Column(String(20))
@@ -21,7 +21,7 @@ def update(self, id=None, name=None, animal_type=None, tags=None, created=None):
             self.created = created
 
     def dump(self):
-        return {k: v for k, v in vars(self).items() if not k.startswith('_')}
+        return {k: v for k, v in vars(self).items() if not k.startswith("_")}
 
 
 def init_db(uri):
diff --git a/firetail/__init__.py b/firetail/__init__.py
index ea544df..c17d582 100755
--- a/firetail/__init__.py
+++ b/firetail/__init__.py
@@ -22,7 +22,7 @@
 from .resolver import Resolution, Resolver, RestyResolver  # NOQA
 from .utils import not_installed_error  # NOQA
 
-full_name = f'{__package__}.operation'
+full_name = f"{__package__}.operation"
 sys.modules[full_name] = sys.modules[compat.__name__]
 
 
@@ -48,4 +48,6 @@
     AioHttpApp = _aiohttp_not_installed_error
 
 # This version is replaced during release process.
+# fmt: off
 __version__ = '2022.11.dev19'
+# fmt: on
diff --git a/firetail/apis/abstract.py b/firetail/apis/abstract.py
index 69c85f2..17ffaa6 100644
--- a/firetail/apis/abstract.py
+++ b/firetail/apis/abstract.py
@@ -22,13 +22,12 @@
 from ..utils import is_json_mimetype
 
 MODULE_PATH = pathlib.Path(__file__).absolute().parent.parent
-SWAGGER_UI_URL = 'ui'
+SWAGGER_UI_URL = "ui"
 
-logger = logging.getLogger('firetail.apis.abstract')
+logger = logging.getLogger("firetail.apis.abstract")
 
 
 class AbstractAPIMeta(abc.ABCMeta):
-
     def __init__(cls, name, bases, attrs):
         abc.ABCMeta.__init__(cls, name, bases, attrs)
         cls._set_jsonifier()
@@ -39,11 +38,22 @@ class AbstractAPI(metaclass=AbstractAPIMeta):
     Defines an abstract interface for a Swagger API
     """
 
-    def __init__(self, specification, base_path=None, arguments=None,
-                 validate_responses=False, strict_validation=False, resolver=None,
-                 auth_all_paths=False, debug=False, resolver_error_handler=None,
-                 validator_map=None, pythonic_params=False, pass_context_arg_name=None, options=None,
-                 ):
+    def __init__(
+        self,
+        specification,
+        base_path=None,
+        arguments=None,
+        validate_responses=False,
+        strict_validation=False,
+        resolver=None,
+        auth_all_paths=False,
+        debug=False,
+        resolver_error_handler=None,
+        validator_map=None,
+        pythonic_params=False,
+        pass_context_arg_name=None,
+        options=None,
+    ):
         """
         :type specification: pathlib.Path | dict
         :type base_path: str | None
@@ -71,40 +81,49 @@ def __init__(self, specification, base_path=None, arguments=None,
         self.validator_map = validator_map
         self.resolver_error_handler = resolver_error_handler
 
-        logger.debug('Loading specification: %s', specification,
-                     extra={'swagger_yaml': specification,
-                            'base_path': base_path,
-                            'arguments': arguments,
-                            'auth_all_paths': auth_all_paths})
+        logger.debug(
+            "Loading specification: %s",
+            specification,
+            extra={
+                "swagger_yaml": specification,
+                "base_path": base_path,
+                "arguments": arguments,
+                "auth_all_paths": auth_all_paths,
+            },
+        )
 
         # Avoid validator having ability to modify specification
         self.specification = Specification.load(specification, arguments=arguments)
 
-        logger.debug('Read specification', extra={'spec': self.specification})
+        logger.debug("Read specification", extra={"spec": self.specification})
 
         self.options = FiretailOptions(options, oas_version=self.specification.version)
 
-        logger.debug('Options Loaded',
-                     extra={'swagger_ui': self.options.openapi_console_ui_available,
-                            'swagger_path': self.options.openapi_console_ui_from_dir,
-                            'swagger_url': self.options.openapi_console_ui_path})
+        logger.debug(
+            "Options Loaded",
+            extra={
+                "swagger_ui": self.options.openapi_console_ui_available,
+                "swagger_path": self.options.openapi_console_ui_from_dir,
+                "swagger_url": self.options.openapi_console_ui_path,
+            },
+        )
 
         self._set_base_path(base_path)
 
-        logger.debug('Security Definitions: %s', self.specification.security_definitions)
+        logger.debug("Security Definitions: %s", self.specification.security_definitions)
 
         self.resolver = resolver or Resolver()
 
-        logger.debug('Validate Responses: %s', str(validate_responses))
+        logger.debug("Validate Responses: %s", str(validate_responses))
         self.validate_responses = validate_responses
 
-        logger.debug('Strict Request Validation: %s', str(strict_validation))
+        logger.debug("Strict Request Validation: %s", str(strict_validation))
         self.strict_validation = strict_validation
 
-        logger.debug('Pythonic params: %s', str(pythonic_params))
+        logger.debug("Pythonic params: %s", str(pythonic_params))
         self.pythonic_params = pythonic_params
 
-        logger.debug('pass_context_arg_name: %s', pass_context_arg_name)
+        logger.debug("pass_context_arg_name: %s", pass_context_arg_name)
         self.pass_context_arg_name = pass_context_arg_name
 
         self.security_handler_factory = self.make_security_handler_factory(pass_context_arg_name)
@@ -119,10 +138,7 @@ def __init__(self, specification, base_path=None, arguments=None,
         self.add_paths()
 
         if auth_all_paths:
-            self.add_auth_on_not_found(
-                self.specification.security,
-                self.specification.security_definitions
-            )
+            self.add_auth_on_not_found(self.specification.security, self.specification.security_definitions)
 
     def _set_base_path(self, base_path=None):
         if base_path is not None:
@@ -154,7 +170,7 @@ def add_auth_on_not_found(self, security, security_definitions):
     @staticmethod
     @abc.abstractmethod
     def make_security_handler_factory(pass_context_arg_name):
-        """ Create SecurityHandlerFactory to create all security check handlers """
+        """Create SecurityHandlerFactory to create all security check handlers"""
 
     def add_operation(self, path, method):
         """
@@ -183,7 +199,7 @@ def add_operation(self, path, method):
             strict_validation=self.strict_validation,
             pythonic_params=self.pythonic_params,
             uri_parser_class=self.options.uri_parser_class,
-            pass_context_arg_name=self.pass_context_arg_name
+            pass_context_arg_name=self.pass_context_arg_name,
         )
         self._add_operation_internal(method, path, operation)
 
@@ -199,9 +215,7 @@ def _add_resolver_error_handler(self, method, path, err):
         Adds a handler for ResolverError for the given method and path.
         """
         operation = self.resolver_error_handler(
-            err,
-            security=self.specification.security,
-            security_definitions=self.specification.security_definitions
+            err, security=self.specification.security, security_definitions=self.specification.security_definitions
         )
         self._add_operation_internal(method, path, operation)
 
@@ -211,9 +225,9 @@ def add_paths(self, paths=None):
 
         :type paths: list
         """
-        paths = paths or self.specification.get('paths', dict())
+        paths = paths or self.specification.get("paths", dict())
         for path, methods in paths.items():
-            logger.debug('Adding %s%s...', self.base_path, path)
+            logger.debug("Adding %s%s...", self.base_path, path)
 
             for method in methods:
                 if method not in METHODS:
@@ -232,10 +246,8 @@ def add_paths(self, paths=None):
                     self._handle_add_operation_error(path, method, sys.exc_info())
 
     def _handle_add_operation_error(self, path, method, exc_info):
-        url = f'{self.base_path}{path}'
-        error_msg = 'Failed to add operation for {method} {url}'.format(
-            method=method.upper(),
-            url=url)
+        url = f"{self.base_path}{path}"
+        error_msg = "Failed to add operation for {method} {url}".format(method=method.upper(), url=url)
         if self.debug:
             logger.exception(error_msg)
         else:
@@ -277,32 +289,27 @@ def _get_response(cls, response, mimetype=None, extra_context=None):
         """
         if extra_context is None:
             extra_context = {}
-        logger.debug('Getting data and status code',
-                     extra={
-                         'data': response,
-                         'data_type': type(response),
-                         **extra_context
-                     })
+        logger.debug(
+            "Getting data and status code", extra={"data": response, "data_type": type(response), **extra_context}
+        )
 
         if isinstance(response, FiretailResponse):
             framework_response = cls._firetail_to_framework_response(response, mimetype, extra_context)
         else:
             framework_response = cls._response_from_handler(response, mimetype, extra_context)
 
-        logger.debug('Got framework response',
-                     extra={
-                         'response': framework_response,
-                         'response_type': type(framework_response),
-                         **extra_context
-                     })
+        logger.debug(
+            "Got framework response",
+            extra={"response": framework_response, "response_type": type(framework_response), **extra_context},
+        )
         return framework_response
 
     @classmethod
     def _response_from_handler(
-            cls,
-            response: t.Union[t.Any, str, t.Tuple[str], t.Tuple[str, int], t.Tuple[str, int, dict]],
-            mimetype: str,
-            extra_context: t.Optional[dict] = None
+        cls,
+        response: t.Union[t.Any, str, t.Tuple[str], t.Tuple[str, int], t.Tuple[str, int, dict]],
+        mimetype: str,
+        extra_context: t.Optional[dict] = None,
     ) -> t.Any:
         """
         Create a framework response from the operation handler data.
@@ -323,7 +330,7 @@ def _response_from_handler(
         if isinstance(response, tuple):
             len_response = len(response)
             if len_response == 1:
-                data, = response
+                (data,) = response
                 return cls._build_response(mimetype=mimetype, data=data, extra_context=extra_context)
             if len_response == 2:
                 if isinstance(response[1], (int, Enum)):
@@ -336,23 +343,21 @@ def _response_from_handler(
                 return cls._build_response(mimetype=mimetype, data=data, headers=headers, extra_context=extra_context)
             elif len_response == 3:
                 data, status_code, headers = response
-                return cls._build_response(mimetype=mimetype,
-                                           data=data,
-                                           status_code=status_code,
-                                           headers=headers,
-                                           extra_context=extra_context)
+                return cls._build_response(
+                    mimetype=mimetype, data=data, status_code=status_code, headers=headers, extra_context=extra_context
+                )
             else:
                 raise TypeError(
-                    'The view function did not return a valid response tuple.'
-                    ' The tuple must have the form (body), (body, status, headers),'
-                    ' (body, status), or (body, headers).'
+                    "The view function did not return a valid response tuple."
+                    " The tuple must have the form (body), (body, status, headers),"
+                    " (body, status), or (body, headers)."
                 )
         else:
             return cls._build_response(mimetype=mimetype, data=response, extra_context=extra_context)
 
     @classmethod
     def get_firetail_response(cls, response, mimetype=None):
-        """ Cast framework dependent response to FiretailResponse used for schema validation """
+        """Cast framework dependent response to FiretailResponse used for schema validation"""
         if isinstance(response, FiretailResponse):
             # If body in FiretailResponse is not byte, it may not pass schema validation.
             # In this case, rebuild response with aiohttp to have consistency
@@ -364,7 +369,7 @@ def get_firetail_response(cls, response, mimetype=None):
                     mimetype=mimetype,
                     content_type=response.content_type,
                     headers=response.headers,
-                    status_code=response.status_code
+                    status_code=response.status_code,
                 )
 
         if not cls._is_framework_response(response):
@@ -374,17 +379,17 @@ def get_firetail_response(cls, response, mimetype=None):
     @classmethod
     @abc.abstractmethod
     def _is_framework_response(cls, response):
-        """ Return True if `response` is a framework response class """
+        """Return True if `response` is a framework response class"""
 
     @classmethod
     @abc.abstractmethod
     def _framework_to_firetail_response(cls, response, mimetype):
-        """ Cast framework response class to FiretailResponse used for schema validation """
+        """Cast framework response class to FiretailResponse used for schema validation"""
 
     @classmethod
     @abc.abstractmethod
     def _firetail_to_framework_response(cls, response, mimetype, extra_context=None):
-        """ Cast FiretailResponse to framework response class """
+        """Cast FiretailResponse to framework response class"""
 
     @classmethod
     @abc.abstractmethod
@@ -426,12 +431,7 @@ def _prepare_body_and_status_code(cls, data, mimetype, status_code=None, extra_c
 
         if extra_context is None:
             extra_context = {}
-        logger.debug('Prepared body and status code (%d)',
-                     status_code,
-                     extra={
-                         'body': body,
-                         **extra_context
-                     })
+        logger.debug("Prepared body and status code (%d)", status_code, extra={"body": body, **extra_context})
 
         return body, status_code, mimetype
 
@@ -451,7 +451,7 @@ def _serialize_data(cls, data, mimetype):
                     "serialize some things as JSON or throw an error instead of silently "
                     "stringifying unknown response bodies. "
                     "Please make sure to specify media/mime types in your specs.",
-                    FutureWarning  # a Deprecation targeted at application users.
+                    FutureWarning,  # a Deprecation targeted at application users.
                 )
                 body = str(data)
         else:
diff --git a/firetail/apis/aiohttp_api.py b/firetail/apis/aiohttp_api.py
index 55be3e9..1e8c34f 100644
--- a/firetail/apis/aiohttp_api.py
+++ b/firetail/apis/aiohttp_api.py
@@ -27,7 +27,7 @@
 from firetail.security import AioHttpSecurityHandlerFactory
 from firetail.utils import yamldumper
 
-logger = logging.getLogger('firetail.apis.aiohttp_api')
+logger = logging.getLogger("firetail.apis.aiohttp_api")
 
 
 def _generic_problem(http_status: HTTPStatus, exc: Exception = None):
@@ -54,8 +54,15 @@ async def problems_middleware(request, handler):
     try:
         response = await handler(request)
     except ProblemException as exc:
-        response = problem(status=exc.status, detail=exc.detail, title=exc.title,
-                           type=exc.type, instance=exc.instance, headers=exc.headers, ext=exc.ext)
+        response = problem(
+            status=exc.status,
+            detail=exc.detail,
+            title=exc.title,
+            type=exc.type,
+            instance=exc.instance,
+            headers=exc.headers,
+            ext=exc.ext,
+        )
     except (werkzeug_HTTPException, _HttpNotFoundError) as exc:
         response = problem(status=exc.code, title=exc.name, detail=exc.description)
     except web.HTTPError as exc:
@@ -72,11 +79,11 @@ async def problems_middleware(request, handler):
         raise
     except asyncio.TimeoutError as exc:
         # overrides 504 from aiohttp.web_protocol.RequestHandler.start()
-        logger.debug('Request handler timed out.', exc_info=exc)
+        logger.debug("Request handler timed out.", exc_info=exc)
         response = _generic_problem(HTTPStatus.GATEWAY_TIMEOUT, exc)
     except Exception as exc:
         # overrides 500 from aiohttp.web_protocol.RequestHandler.start()
-        logger.exception('Error handling request', exc_info=exc)
+        logger.exception("Error handling request", exc_info=exc)
         response = _generic_problem(HTTPStatus.INTERNAL_SERVER_ERROR, exc)
 
     if isinstance(response, FiretailResponse):
@@ -90,30 +97,17 @@ def __init__(self, *args, **kwargs):
         # clients sometimes turn POST requests into GET requests
         # on 301, 302, or 303
         # see https://tools.ietf.org/html/rfc7538
-        trailing_slash_redirect = normalize_path_middleware(
-            append_slash=True,
-            redirect_class=HTTPPermanentRedirect
-        )
-        self.subapp = web.Application(
-            middlewares=[
-                problems_middleware,
-                trailing_slash_redirect
-            ]
-        )
+        trailing_slash_redirect = normalize_path_middleware(append_slash=True, redirect_class=HTTPPermanentRedirect)
+        self.subapp = web.Application(middlewares=[problems_middleware, trailing_slash_redirect])
         AbstractAPI.__init__(self, *args, **kwargs)
 
-        aiohttp_jinja2.setup(
-            self.subapp,
-            loader=jinja2.FileSystemLoader(
-                str(self.options.openapi_console_ui_from_dir)
-            )
-        )
-        middlewares = self.options.as_dict().get('middlewares', [])
+        aiohttp_jinja2.setup(self.subapp, loader=jinja2.FileSystemLoader(str(self.options.openapi_console_ui_from_dir)))
+        middlewares = self.options.as_dict().get("middlewares", [])
         self.subapp.middlewares.extend(middlewares)
 
     @staticmethod
     def make_security_handler_factory(pass_context_arg_name):
-        """ Create default SecurityHandlerFactory to create all security check handlers """
+        """Create default SecurityHandlerFactory to create all security check handlers"""
         return AioHttpSecurityHandlerFactory(pass_context_arg_name)
 
     def _set_base_path(self, base_path):
@@ -122,7 +116,7 @@ def _set_base_path(self, base_path):
 
     @staticmethod
     def normalize_string(string):
-        return re.sub(r'[^a-zA-Z0-9]', '_', string.strip('/'))
+        return re.sub(r"[^a-zA-Z0-9]", "_", string.strip("/"))
 
     def _base_path_for_prefix(self, request):
         """
@@ -149,13 +143,8 @@ def add_openapi_json(self):
         Adds openapi json to {base_path}/openapi.json
              (or {base_path}/swagger.json for swagger2)
         """
-        logger.debug('Adding spec json: %s/%s', self.base_path,
-                     self.options.openapi_spec_path)
-        self.subapp.router.add_route(
-            'GET',
-            self.options.openapi_spec_path,
-            self._get_openapi_json
-        )
+        logger.debug("Adding spec json: %s/%s", self.base_path, self.options.openapi_spec_path)
+        self.subapp.router.add_route("GET", self.options.openapi_spec_path, self._get_openapi_json)
 
     def add_openapi_yaml(self):
         """
@@ -165,54 +154,34 @@ def add_openapi_yaml(self):
         if not self.options.openapi_spec_path.endswith("json"):
             return
 
-        openapi_spec_path_yaml = \
-            self.options.openapi_spec_path[:-len("json")] + "yaml"
-        logger.debug('Adding spec yaml: %s/%s', self.base_path,
-                     openapi_spec_path_yaml)
-        self.subapp.router.add_route(
-            'GET',
-            openapi_spec_path_yaml,
-            self._get_openapi_yaml
-        )
+        openapi_spec_path_yaml = self.options.openapi_spec_path[: -len("json")] + "yaml"
+        logger.debug("Adding spec yaml: %s/%s", self.base_path, openapi_spec_path_yaml)
+        self.subapp.router.add_route("GET", openapi_spec_path_yaml, self._get_openapi_yaml)
 
     async def _get_openapi_json(self, request):
         return web.Response(
-            status=200,
-            content_type='application/json',
-            body=self.jsonifier.dumps(self._spec_for_prefix(request))
+            status=200, content_type="application/json", body=self.jsonifier.dumps(self._spec_for_prefix(request))
         )
 
     async def _get_openapi_yaml(self, request):
-        return web.Response(
-            status=200,
-            content_type='text/yaml',
-            body=yamldumper(self._spec_for_prefix(request))
-        )
+        return web.Response(status=200, content_type="text/yaml", body=yamldumper(self._spec_for_prefix(request)))
 
     def add_swagger_ui(self):
         """
         Adds swagger ui to {base_path}/ui/
         """
-        console_ui_path = self.options.openapi_console_ui_path.strip().rstrip('/')
-        logger.debug('Adding swagger-ui: %s%s/',
-                     self.base_path,
-                     console_ui_path)
+        console_ui_path = self.options.openapi_console_ui_path.strip().rstrip("/")
+        logger.debug("Adding swagger-ui: %s%s/", self.base_path, console_ui_path)
 
         for path in (
-            console_ui_path + '/',
-            console_ui_path + '/index.html',
+            console_ui_path + "/",
+            console_ui_path + "/index.html",
         ):
-            self.subapp.router.add_route(
-                'GET',
-                path,
-                self._get_swagger_ui_home
-            )
+            self.subapp.router.add_route("GET", path, self._get_swagger_ui_home)
 
         if self.options.openapi_console_ui_config is not None:
             self.subapp.router.add_route(
-                'GET',
-                console_ui_path + '/swagger-ui-config.json',
-                self._get_swagger_ui_config
+                "GET", console_ui_path + "/swagger-ui-config.json", self._get_swagger_ui_config
             )
 
         # we have to add an explicit redirect instead of relying on the
@@ -220,81 +189,55 @@ def add_swagger_ui(self):
         # from this dir (below)
 
         async def redirect(request):
-            raise web.HTTPMovedPermanently(
-                location=self.base_path + console_ui_path + '/'
-            )
+            raise web.HTTPMovedPermanently(location=self.base_path + console_ui_path + "/")
 
-        self.subapp.router.add_route(
-            'GET',
-            console_ui_path,
-            redirect
-        )
+        self.subapp.router.add_route("GET", console_ui_path, redirect)
 
         # this route will match and get a permission error when trying to
         # serve index.html, so we add the redirect above.
         self.subapp.router.add_static(
-            console_ui_path,
-            path=str(self.options.openapi_console_ui_from_dir),
-            name='swagger_ui_static'
+            console_ui_path, path=str(self.options.openapi_console_ui_from_dir), name="swagger_ui_static"
         )
 
-    @aiohttp_jinja2.template('index.j2')
+    @aiohttp_jinja2.template("index.j2")
     async def _get_swagger_ui_home(self, req):
         base_path = self._base_path_for_prefix(req)
         template_variables = {
-            'openapi_spec_url': (base_path + self.options.openapi_spec_path),
+            "openapi_spec_url": (base_path + self.options.openapi_spec_path),
             **self.options.openapi_console_ui_index_template_variables,
         }
         if self.options.openapi_console_ui_config is not None:
-            template_variables['configUrl'] = 'swagger-ui-config.json'
+            template_variables["configUrl"] = "swagger-ui-config.json"
         return template_variables
 
     async def _get_swagger_ui_config(self, req):
         return web.Response(
-            status=200,
-            content_type='text/json',
-            body=self.jsonifier.dumps(self.options.openapi_console_ui_config)
+            status=200, content_type="text/json", body=self.jsonifier.dumps(self.options.openapi_console_ui_config)
         )
 
     def add_auth_on_not_found(self, security, security_definitions):
         """
         Adds a 404 error handler to authenticate and only expose the 404 status if the security validation pass.
         """
-        logger.debug('Adding path not found authentication')
+        logger.debug("Adding path not found authentication")
         not_found_error = AuthErrorHandler(
-            self, _HttpNotFoundError(),
-            security=security,
-            security_definitions=security_definitions
+            self, _HttpNotFoundError(), security=security, security_definitions=security_definitions
         )
         endpoint_name = f"{self._api_name}_not_found"
-        self.subapp.router.add_route(
-            '*',
-            '/{not_found_path}',
-            not_found_error.function,
-            name=endpoint_name
-        )
+        self.subapp.router.add_route("*", "/{not_found_path}", not_found_error.function, name=endpoint_name)
 
     def _add_operation_internal(self, method, path, operation):
         method = method.upper()
         operation_id = operation.operation_id or path
 
-        logger.debug('... Adding %s -> %s', method, operation_id,
-                     extra=vars(operation))
+        logger.debug("... Adding %s -> %s", method, operation_id, extra=vars(operation))
 
         handler = operation.function
-        endpoint_name = '{}_{}_{}'.format(
-            self._api_name,
-            AioHttpApi.normalize_string(path),
-            method.lower()
-        )
-        self.subapp.router.add_route(
-            method, path, handler, name=endpoint_name
-        )
+        endpoint_name = "{}_{}_{}".format(self._api_name, AioHttpApi.normalize_string(path), method.lower())
+        self.subapp.router.add_route(method, path, handler, name=endpoint_name)
 
-        if not path.endswith('/'):
-            self.subapp.router.add_route(
-                method, path + '/', handler, name=endpoint_name + '_'
-            )
+        if not path.endswith("/"):
+            self.subapp.router.add_route(method, path + "/", handler, name=endpoint_name + "_")
 
     @classmethod
     async def get_request(cls, req):
@@ -307,15 +250,15 @@ async def get_request(cls, req):
         url = str(req.url)
 
         logger.debug(
-            'Getting data and status code',
+            "Getting data and status code",
             extra={
                 # has_body | can_read_body report if
                 # body has been read or not
                 # body_exists refers to underlying stream of data
-                'body_exists': req.body_exists,
-                'can_read_body': req.can_read_body,
-                'content_type': req.content_type,
-                'url': url,
+                "body_exists": req.body_exists,
+                "can_read_body": req.can_read_body,
+                "content_type": req.content_type,
+                "url": url,
             },
         )
 
@@ -331,7 +274,7 @@ async def get_request(cls, req):
         form = {}
 
         if post_data:
-            logger.debug('Reading multipart data from request')
+            logger.debug("Reading multipart data from request")
             for k, v in post_data.items():
                 if isinstance(v, web.FileField):
                     if k in files:
@@ -348,22 +291,24 @@ async def get_request(cls, req):
                     # put normal fields as an array, that's how werkzeug does that for Flask
                     # and that's what Firetail expects in its processing functions
                     form[k] = [v]
-            body = b''
+            body = b""
         else:
-            logger.debug('Reading data from request')
+            logger.debug("Reading data from request")
             body = await req.read()
 
-        return FiretailRequest(url=url,
-                               method=req.method.lower(),
-                               path_params=dict(req.match_info),
-                               query=query,
-                               headers=headers,
-                               body=body,
-                               json_getter=lambda: cls.jsonifier.loads(body),
-                               form=form,
-                               files=files,
-                               context=req,
-                               cookies=req.cookies)
+        return FiretailRequest(
+            url=url,
+            method=req.method.lower(),
+            path_params=dict(req.match_info),
+            query=query,
+            headers=headers,
+            body=body,
+            json_getter=lambda: cls.jsonifier.loads(body),
+            form=form,
+            files=files,
+            context=req,
+            cookies=req.cookies,
+        )
 
     @classmethod
     async def get_response(cls, response, mimetype=None, request=None):
@@ -376,18 +321,18 @@ async def get_response(cls, response, mimetype=None, request=None):
         while asyncio.iscoroutine(response):
             response = await response
 
-        url = str(request.url) if request else ''
+        url = str(request.url) if request else ""
 
         return cls._get_response(response, mimetype=mimetype, extra_context={"url": url})
 
     @classmethod
     def _is_framework_response(cls, response):
-        """ Return True if `response` is a framework response class """
+        """Return True if `response` is a framework response class"""
         return isinstance(response, web.StreamResponse)
 
     @classmethod
     def _framework_to_firetail_response(cls, response, mimetype):
-        """ Cast framework response class to FiretailResponse used for schema validation """
+        """Cast framework response class to FiretailResponse used for schema validation"""
         body = None
         if hasattr(response, "body"):  # StreamResponse and FileResponse don't have body
             body = response.body
@@ -396,12 +341,12 @@ def _framework_to_firetail_response(cls, response, mimetype):
             mimetype=mimetype,
             content_type=response.content_type,
             headers=response.headers,
-            body=body
+            body=body,
         )
 
     @classmethod
     def _firetail_to_framework_response(cls, response, mimetype, extra_context=None):
-        """ Cast FiretailResponse to framework response class """
+        """Cast FiretailResponse to framework response class"""
         return cls._build_response(
             mimetype=response.mimetype or mimetype,
             status_code=response.status_code,
@@ -416,10 +361,9 @@ def _build_response(cls, data, mimetype, content_type=None, headers=None, status
         if cls._is_framework_response(data):
             raise TypeError("Cannot return web.StreamResponse in tuple. Only raw data can be returned in tuple.")
 
-        data, status_code, serialized_mimetype = cls._prepare_body_and_status_code(data=data,
-                                                                                   mimetype=mimetype,
-                                                                                   status_code=status_code,
-                                                                                   extra_context=extra_context)
+        data, status_code, serialized_mimetype = cls._prepare_body_and_status_code(
+            data=data, mimetype=mimetype, status_code=status_code, extra_context=extra_context
+        )
 
         if isinstance(data, str):
             text = data
@@ -438,11 +382,11 @@ def _set_jsonifier(cls):
 
 class _HttpNotFoundError(HTTPNotFound):
     def __init__(self):
-        self.name = 'Not Found'
+        self.name = "Not Found"
         self.description = (
-            'The requested URL was not found on the server. '
-            'If you entered the URL manually please check your spelling and '
-            'try again.'
+            "The requested URL was not found on the server. "
+            "If you entered the URL manually please check your spelling and "
+            "try again."
         )
         self.code = type(self).status_code
         self.empty_body = True
diff --git a/firetail/apis/flask_api.py b/firetail/apis/flask_api.py
index 067c625..5f7af2d 100644
--- a/firetail/apis/flask_api.py
+++ b/firetail/apis/flask_api.py
@@ -20,14 +20,13 @@
 from firetail.security import FlaskSecurityHandlerFactory
 from firetail.utils import is_json_mimetype, yamldumper
 
-logger = logging.getLogger('firetail.apis.flask_api')
+logger = logging.getLogger("firetail.apis.flask_api")
 
 
 class FlaskApi(AbstractAPI):
-
     @staticmethod
     def make_security_handler_factory(pass_context_arg_name):
-        """ Create default SecurityHandlerFactory to create all security check handlers """
+        """Create default SecurityHandlerFactory to create all security check handlers"""
         return FlaskSecurityHandlerFactory(pass_context_arg_name)
 
     def _set_base_path(self, base_path):
@@ -35,23 +34,21 @@ def _set_base_path(self, base_path):
         self._set_blueprint()
 
     def _set_blueprint(self):
-        logger.debug('Creating API blueprint: %s', self.base_path)
+        logger.debug("Creating API blueprint: %s", self.base_path)
         endpoint = flask_utils.flaskify_endpoint(self.base_path)
-        self.blueprint = flask.Blueprint(endpoint, __name__, url_prefix=self.base_path,
-                                         template_folder=str(self.options.openapi_console_ui_from_dir))
+        self.blueprint = flask.Blueprint(
+            endpoint, __name__, url_prefix=self.base_path, template_folder=str(self.options.openapi_console_ui_from_dir)
+        )
 
     def add_openapi_json(self):
         """
         Adds spec json to {base_path}/swagger.json
         or {base_path}/openapi.json (for oas3)
         """
-        logger.debug('Adding spec json: %s/%s', self.base_path,
-                     self.options.openapi_spec_path)
+        logger.debug("Adding spec json: %s/%s", self.base_path, self.options.openapi_spec_path)
         endpoint_name = f"{self.blueprint.name}_openapi_json"
 
-        self.blueprint.add_url_rule(self.options.openapi_spec_path,
-                                    endpoint_name,
-                                    self._handlers.get_json_spec)
+        self.blueprint.add_url_rule(self.options.openapi_spec_path, endpoint_name, self._handlers.get_json_spec)
 
     def add_openapi_yaml(self):
         """
@@ -61,76 +58,60 @@ def add_openapi_yaml(self):
         if not self.options.openapi_spec_path.endswith("json"):
             return
 
-        openapi_spec_path_yaml = \
-            self.options.openapi_spec_path[:-len("json")] + "yaml"
-        logger.debug('Adding spec yaml: %s/%s', self.base_path,
-                     openapi_spec_path_yaml)
+        openapi_spec_path_yaml = self.options.openapi_spec_path[: -len("json")] + "yaml"
+        logger.debug("Adding spec yaml: %s/%s", self.base_path, openapi_spec_path_yaml)
         endpoint_name = f"{self.blueprint.name}_openapi_yaml"
-        self.blueprint.add_url_rule(
-            openapi_spec_path_yaml,
-            endpoint_name,
-            self._handlers.get_yaml_spec
-        )
+        self.blueprint.add_url_rule(openapi_spec_path_yaml, endpoint_name, self._handlers.get_yaml_spec)
 
     def add_swagger_ui(self):
         """
         Adds swagger ui to {base_path}/ui/
         """
-        console_ui_path = self.options.openapi_console_ui_path.strip('/')
-        logger.debug('Adding swagger-ui: %s/%s/',
-                     self.base_path,
-                     console_ui_path)
+        console_ui_path = self.options.openapi_console_ui_path.strip("/")
+        logger.debug("Adding swagger-ui: %s/%s/", self.base_path, console_ui_path)
 
         if self.options.openapi_console_ui_config is not None:
             config_endpoint_name = f"{self.blueprint.name}_swagger_ui_config"
-            config_file_url = '/{console_ui_path}/swagger-ui-config.json'.format(
-                console_ui_path=console_ui_path)
+            config_file_url = "/{console_ui_path}/swagger-ui-config.json".format(console_ui_path=console_ui_path)
 
-            self.blueprint.add_url_rule(config_file_url,
-                                        config_endpoint_name,
-                                        lambda: flask.jsonify(self.options.openapi_console_ui_config))
+            self.blueprint.add_url_rule(
+                config_file_url, config_endpoint_name, lambda: flask.jsonify(self.options.openapi_console_ui_config)
+            )
 
         static_endpoint_name = f"{self.blueprint.name}_swagger_ui_static"
-        static_files_url = '/{console_ui_path}/<path:filename>'.format(
-            console_ui_path=console_ui_path)
+        static_files_url = "/{console_ui_path}/<path:filename>".format(console_ui_path=console_ui_path)
 
-        self.blueprint.add_url_rule(static_files_url,
-                                    static_endpoint_name,
-                                    self._handlers.console_ui_static_files)
+        self.blueprint.add_url_rule(static_files_url, static_endpoint_name, self._handlers.console_ui_static_files)
 
         index_endpoint_name = f"{self.blueprint.name}_swagger_ui_index"
-        console_ui_url = '/{console_ui_path}/'.format(
-            console_ui_path=console_ui_path)
+        console_ui_url = "/{console_ui_path}/".format(console_ui_path=console_ui_path)
 
-        self.blueprint.add_url_rule(console_ui_url,
-                                    index_endpoint_name,
-                                    self._handlers.console_ui_home)
+        self.blueprint.add_url_rule(console_ui_url, index_endpoint_name, self._handlers.console_ui_home)
 
     def add_auth_on_not_found(self, security, security_definitions):
         """
         Adds a 404 error handler to authenticate and only expose the 404 status if the security validation pass.
         """
-        logger.debug('Adding path not found authentication')
-        not_found_error = AuthErrorHandler(self, werkzeug.exceptions.NotFound(), security=security,
-                                           security_definitions=security_definitions)
+        logger.debug("Adding path not found authentication")
+        not_found_error = AuthErrorHandler(
+            self, werkzeug.exceptions.NotFound(), security=security, security_definitions=security_definitions
+        )
         endpoint_name = f"{self.blueprint.name}_not_found"
-        self.blueprint.add_url_rule('/<path:invalid_path>', endpoint_name, not_found_error.function)
+        self.blueprint.add_url_rule("/<path:invalid_path>", endpoint_name, not_found_error.function)
 
     def _add_operation_internal(self, method, path, operation):
         operation_id = operation.operation_id
-        logger.debug('... Adding %s -> %s', method.upper(), operation_id,
-                     extra=vars(operation))
+        logger.debug("... Adding %s -> %s", method.upper(), operation_id, extra=vars(operation))
 
         flask_path = flask_utils.flaskify_path(path, operation.get_path_parameter_types())
-        endpoint_name = flask_utils.flaskify_endpoint(operation.operation_id,
-                                                      operation.randomize_endpoint)
+        endpoint_name = flask_utils.flaskify_endpoint(operation.operation_id, operation.randomize_endpoint)
         function = operation.function
         self.blueprint.add_url_rule(flask_path, endpoint_name, function, methods=[method])
 
     @property
     def _handlers(self):
         # type: () -> InternalHandlers
-        if not hasattr(self, '_internal_handlers'):
+        if not hasattr(self, "_internal_handlers"):
             self._internal_handlers = InternalHandlers(self.base_path, self.options, self.specification)
         return self._internal_handlers
 
@@ -152,24 +133,24 @@ def get_response(cls, response, mimetype=None, request=None):
 
     @classmethod
     def _is_framework_response(cls, response):
-        """ Return True if provided response is a framework type """
+        """Return True if provided response is a framework type"""
         return flask_utils.is_flask_response(response)
 
     @classmethod
     def _framework_to_firetail_response(cls, response, mimetype):
-        """ Cast framework response class to FiretailResponse used for schema validation """
+        """Cast framework response class to FiretailResponse used for schema validation"""
         return FiretailResponse(
             status_code=response.status_code,
             mimetype=response.mimetype,
             content_type=response.content_type,
             headers=response.headers,
             body=response.get_data() if not response.direct_passthrough else None,
-            is_streamed=response.is_streamed
+            is_streamed=response.is_streamed,
         )
 
     @classmethod
     def _firetail_to_framework_response(cls, response, mimetype, extra_context=None):
-        """ Cast FiretailResponse to framework response class """
+        """Cast FiretailResponse to framework response class"""
         flask_response = cls._build_response(
             mimetype=response.mimetype or mimetype,
             content_type=response.content_type,
@@ -177,28 +158,27 @@ def _firetail_to_framework_response(cls, response, mimetype, extra_context=None)
             status_code=response.status_code,
             data=response.body,
             extra_context=extra_context,
-            )
+        )
 
         return flask_response
 
     @classmethod
     def _build_response(
-            cls, mimetype, content_type=None, headers=None, status_code=None, data=None, extra_context=None
+        cls, mimetype, content_type=None, headers=None, status_code=None, data=None, extra_context=None
     ):
         if cls._is_framework_response(data):
             return flask.current_app.make_response((data, status_code, headers))
 
-        data, status_code, serialized_mimetype = cls._prepare_body_and_status_code(data=data,
-                                                                                   mimetype=mimetype,
-                                                                                   status_code=status_code,
-                                                                                   extra_context=extra_context)
+        data, status_code, serialized_mimetype = cls._prepare_body_and_status_code(
+            data=data, mimetype=mimetype, status_code=status_code, extra_context=extra_context
+        )
 
         kwargs = {
-            'mimetype': mimetype or serialized_mimetype,
-            'content_type': content_type,
-            'headers': headers,
-            'response': data,
-            'status': status_code
+            "mimetype": mimetype or serialized_mimetype,
+            "content_type": content_type,
+            "headers": headers,
+            "response": data,
+            "status": status_code,
         }
         kwargs = {k: v for k, v in kwargs.items() if v is not None}
         return flask.current_app.response_class(**kwargs)
@@ -207,7 +187,7 @@ def _build_response(
     def _serialize_data(cls, data, mimetype):
         # TODO: harmonize flask and aiohttp serialization when mimetype=None or mimetype is not JSON
         #       (cases where it might not make sense to jsonify the data)
-        if (isinstance(mimetype, str) and is_json_mimetype(mimetype)):
+        if isinstance(mimetype, str) and is_json_mimetype(mimetype):
             body = cls.jsonifier.dumps(data)
         elif not (isinstance(data, bytes) or isinstance(data, str)):
             warnings.warn(
@@ -217,7 +197,7 @@ def _serialize_data(cls, data, mimetype):
                 "This will be replaced by something that is mimetype-specific and may "
                 "raise an error instead of silently converting everything to JSON. "
                 "Please make sure to specify media/mime types in your specs.",
-                FutureWarning  # a Deprecation targeted at application users.
+                FutureWarning,  # a Deprecation targeted at application users.
             )
             body = cls.jsonifier.dumps(data)
         else:
@@ -239,7 +219,7 @@ def get_request(cls, *args, **params):
         :rtype: FiretailRequest
         """
         context_dict = {}
-        setattr(flask._request_ctx_stack.top, 'firetail_context', context_dict)
+        setattr(flask._request_ctx_stack.top, "firetail_context", context_dict)
         flask_request = flask.request
         request = FiretailRequest(
             flask_request.url,
@@ -254,12 +234,10 @@ def get_request(cls, *args, **params):
             context=context_dict,
             cookies=flask_request.cookies,
         )
-        logger.debug('Getting data and status code',
-                     extra={
-                         'data': request.body,
-                         'data_type': type(request.body),
-                         'url': request.url
-                     })
+        logger.debug(
+            "Getting data and status code",
+            extra={"data": request.body, "data_type": type(request.body), "url": request.url},
+        )
         return request
 
     @classmethod
@@ -271,7 +249,7 @@ def _set_jsonifier(cls):
 
 
 def _get_context():
-    return getattr(flask._request_ctx_stack.top, 'firetail_context')
+    return getattr(flask._request_ctx_stack.top, "firetail_context")
 
 
 context = LocalProxy(_get_context)
@@ -295,22 +273,19 @@ def console_ui_home(self):
         """
         openapi_json_route_name = "{blueprint}.{prefix}_openapi_json"
         escaped = flask_utils.flaskify_endpoint(self.base_path)
-        openapi_json_route_name = openapi_json_route_name.format(
-            blueprint=escaped,
-            prefix=escaped
-        )
+        openapi_json_route_name = openapi_json_route_name.format(blueprint=escaped, prefix=escaped)
         template_variables = {
-            'openapi_spec_url': flask.url_for(openapi_json_route_name),
+            "openapi_spec_url": flask.url_for(openapi_json_route_name),
             **self.options.openapi_console_ui_index_template_variables,
         }
         if self.options.openapi_console_ui_config is not None:
-            template_variables['configUrl'] = 'swagger-ui-config.json'
+            template_variables["configUrl"] = "swagger-ui-config.json"
 
         # Use `render_template_string` instead of `render_template` to circumvent the flask
         # template lookup mechanism and explicitly render the template of the current blueprint.
         # https://github.com/zalando/firetail/issues/1289#issuecomment-884105076
         template_dir = pathlib.Path(self.options.openapi_console_ui_from_dir)
-        index_path = template_dir / 'index.j2'
+        index_path = template_dir / "index.j2"
         return flask.render_template_string(index_path.read_text(), **template_variables)
 
     def console_ui_static_files(self, filename):
diff --git a/firetail/apis/flask_utils.py b/firetail/apis/flask_utils.py
index e2944f0..70aede1 100644
--- a/firetail/apis/flask_utils.py
+++ b/firetail/apis/flask_utils.py
@@ -10,15 +10,11 @@
 import flask
 import werkzeug.wrappers
 
-PATH_PARAMETER = re.compile(r'\{([^}]*)\}')
+PATH_PARAMETER = re.compile(r"\{([^}]*)\}")
 
 # map Swagger type to flask path converter
 # see http://flask.pocoo.org/docs/0.10/api/#url-route-registrations
-PATH_PARAMETER_CONVERTERS = {
-    'integer': 'int',
-    'number': 'float',
-    'path': 'path'
-}
+PATH_PARAMETER_CONVERTERS = {"integer": "int", "number": "float", "path": "path"}
 
 
 def flaskify_endpoint(identifier, randomize=None):
@@ -32,23 +28,21 @@ def flaskify_endpoint(identifier, randomize=None):
     :rtype: str
 
     """
-    result = identifier.replace('.', '_')
+    result = identifier.replace(".", "_")
     if randomize is None:
         return result
 
     chars = string.ascii_uppercase + string.digits
     return "{result}|{random_string}".format(
-        result=result,
-        random_string=''.join(random.SystemRandom().choice(chars) for _ in range(randomize)))
+        result=result, random_string="".join(random.SystemRandom().choice(chars) for _ in range(randomize))
+    )
 
 
 def convert_path_parameter(match, types):
     name = match.group(1)
     swagger_type = types.get(name)
     converter = PATH_PARAMETER_CONVERTERS.get(swagger_type)
-    return '<{}{}{}>'.format(
-        converter or '', ':' if converter else '', name.replace('-', '_')
-    )
+    return "<{}{}{}>".format(converter or "", ":" if converter else "", name.replace("-", "_"))
 
 
 def flaskify_path(swagger_path, types=None):
diff --git a/firetail/apps/abstract.py b/firetail/apps/abstract.py
index f617987..fc09b35 100644
--- a/firetail/apps/abstract.py
+++ b/firetail/apps/abstract.py
@@ -10,13 +10,26 @@
 from ..options import FiretailOptions
 from ..resolver import Resolver
 
-logger = logging.getLogger('firetail.app')
+logger = logging.getLogger("firetail.app")
 
 
 class AbstractApp(metaclass=abc.ABCMeta):
-    def __init__(self, import_name, api_cls, port=None, specification_dir='',
-                 host=None, server=None, server_args=None, arguments=None, auth_all_paths=False, debug=None,
-                 resolver=None, options=None, skip_error_handlers=False):
+    def __init__(
+        self,
+        import_name,
+        api_cls,
+        port=None,
+        specification_dir="",
+        host=None,
+        server=None,
+        server_args=None,
+        arguments=None,
+        auth_all_paths=False,
+        debug=None,
+        resolver=None,
+        options=None,
+        skip_error_handlers=False,
+    ):
         """
         :param import_name: the name of the application package
         :type import_name: str
@@ -58,7 +71,7 @@ def __init__(self, import_name, api_cls, port=None, specification_dir='',
 
         # we get our application root path to avoid duplicating logic
         self.root_path = self.get_root_path()
-        logger.debug('Root Path: %s', self.root_path)
+        logger.debug("Root Path: %s", self.root_path)
 
         specification_dir = pathlib.Path(specification_dir)  # Ensure specification dir is a Path
         if specification_dir.is_absolute():
@@ -66,10 +79,10 @@ def __init__(self, import_name, api_cls, port=None, specification_dir='',
         else:
             self.specification_dir = self.root_path / specification_dir
 
-        logger.debug('Specification directory: %s', self.specification_dir)
+        logger.debug("Specification directory: %s", self.specification_dir)
 
         if not skip_error_handlers:
-            logger.debug('Setting error handlers')
+            logger.debug("Setting error handlers")
             self.set_errors_handlers()
 
     @abc.abstractmethod
@@ -90,11 +103,21 @@ def set_errors_handlers(self):
         Sets all errors handlers of the user framework application
         """
 
-    def add_api(self, specification, base_path=None, arguments=None,
-                auth_all_paths=None, validate_responses=False,
-                strict_validation=False, resolver=None, resolver_error=None,
-                pythonic_params=False, pass_context_arg_name=None, options=None,
-                validator_map=None):
+    def add_api(
+        self,
+        specification,
+        base_path=None,
+        arguments=None,
+        auth_all_paths=None,
+        validate_responses=False,
+        strict_validation=False,
+        resolver=None,
+        resolver_error=None,
+        pythonic_params=False,
+        pass_context_arg_name=None,
+        options=None,
+        validator_map=None,
+    ):
         """
         Adds an API to the application based on a swagger file or API dict
 
@@ -132,7 +155,7 @@ def add_api(self, specification, base_path=None, arguments=None,
             resolver_error_handler = self._resolver_error_handler
 
         resolver = resolver or self.resolver
-        resolver = Resolver(resolver) if hasattr(resolver, '__call__') else resolver
+        resolver = Resolver(resolver) if hasattr(resolver, "__call__") else resolver
 
         auth_all_paths = auth_all_paths if auth_all_paths is not None else self.auth_all_paths
         # TODO test if base_path starts with an / (if not none)
@@ -146,23 +169,26 @@ def add_api(self, specification, base_path=None, arguments=None,
 
         api_options = self.options.extend(options)
 
-        api = self.api_cls(specification,
-                           base_path=base_path,
-                           arguments=arguments,
-                           resolver=resolver,
-                           resolver_error_handler=resolver_error_handler,
-                           validate_responses=validate_responses,
-                           strict_validation=strict_validation,
-                           auth_all_paths=auth_all_paths,
-                           debug=self.debug,
-                           validator_map=validator_map,
-                           pythonic_params=pythonic_params,
-                           pass_context_arg_name=pass_context_arg_name,
-                           options=api_options.as_dict())
+        api = self.api_cls(
+            specification,
+            base_path=base_path,
+            arguments=arguments,
+            resolver=resolver,
+            resolver_error_handler=resolver_error_handler,
+            validate_responses=validate_responses,
+            strict_validation=strict_validation,
+            auth_all_paths=auth_all_paths,
+            debug=self.debug,
+            validator_map=validator_map,
+            pythonic_params=pythonic_params,
+            pass_context_arg_name=pass_context_arg_name,
+            options=api_options.as_dict(),
+        )
         return api
 
     def _resolver_error_handler(self, *args, **kwargs):
         from firetail.handlers import ResolverErrorHandler
+
         return ResolverErrorHandler(self.api_cls, self.resolver_error, *args, **kwargs)
 
     def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
@@ -201,9 +227,9 @@ def index():
                         limited to (`GET`, `POST` etc.).  By default a rule just listens for `GET` (and implicitly
                         `HEAD`).
         """
-        log_details = {'endpoint': endpoint, 'view_func': view_func.__name__}
+        log_details = {"endpoint": endpoint, "view_func": view_func.__name__}
         log_details.update(options)
-        logger.debug('Adding %s', rule, extra=log_details)
+        logger.debug("Adding %s", rule, extra=log_details)
         self.app.add_url_rule(rule, endpoint, view_func, **options)
 
     def route(self, rule, **options):
@@ -226,7 +252,7 @@ def index():
                         limited to (`GET`, `POST` etc.).  By default a rule just listens for `GET` (and implicitly
                         `HEAD`).
         """
-        logger.debug('Adding %s with decorator', rule, extra=options)
+        logger.debug("Adding %s with decorator", rule, extra=options)
         return self.app.route(rule, **options)
 
     @abc.abstractmethod
diff --git a/firetail/apps/aiohttp_app.py b/firetail/apps/aiohttp_app.py
index b81c4e1..773323e 100644
--- a/firetail/apps/aiohttp_app.py
+++ b/firetail/apps/aiohttp_app.py
@@ -13,13 +13,12 @@
 from ..exceptions import FiretailException
 from .abstract import AbstractApp
 
-logger = logging.getLogger('firetail.aiohttp_app')
+logger = logging.getLogger("firetail.aiohttp_app")
 
 
 class AioHttpApp(AbstractApp):
-
     def __init__(self, import_name, only_one_api=False, **kwargs):
-        super().__init__(import_name, AioHttpApi, server='aiohttp', **kwargs)
+        super().__init__(import_name, AioHttpApi, server="aiohttp", **kwargs)
         self._only_one_api = only_one_api
         self._api_added = False
 
@@ -28,13 +27,13 @@ def create_app(self):
 
     def get_root_path(self):
         mod = sys.modules.get(self.import_name)
-        if mod is not None and hasattr(mod, '__file__'):
+        if mod is not None and hasattr(mod, "__file__"):
             return pathlib.Path(mod.__file__).resolve().parent
 
         loader = pkgutil.get_loader(self.import_name)
         filepath = None
 
-        if hasattr(loader, 'get_filename'):
+        if hasattr(loader, "get_filename"):
             filepath = loader.get_filename(self.import_name)
 
         if filepath is None:
@@ -63,8 +62,7 @@ def add_api(self, specification, **kwargs):
             self.app.add_subapp(api.base_path, api.subapp)
         except ValueError:
             raise FiretailException(
-                "aiohttp doesn't allow to set empty base_path ('/'), "
-                "use non-empty instead, e.g /api"
+                "aiohttp doesn't allow to set empty base_path ('/'), " "use non-empty instead, e.g /api"
             )
 
         return api
@@ -79,21 +77,21 @@ def run(self, port=None, server=None, debug=None, host=None, **options):
             self.port = 5000
 
         self.server = server or self.server
-        self.host = host or self.host or '0.0.0.0'
+        self.host = host or self.host or "0.0.0.0"
 
         if debug is not None:
             self.debug = debug
 
-        logger.debug('Starting %s HTTP server..', self.server, extra=vars(self))
+        logger.debug("Starting %s HTTP server..", self.server, extra=vars(self))
 
-        if self.server == 'aiohttp':
-            logger.info('Listening on %s:%s..', self.host, self.port)
+        if self.server == "aiohttp":
+            logger.info("Listening on %s:%s..", self.host, self.port)
 
-            access_log = options.pop('access_log', None)
+            access_log = options.pop("access_log", None)
 
-            if options.pop('use_default_access_log', None):
+            if options.pop("use_default_access_log", None):
                 access_log = logger
 
             web.run_app(self.app, port=self.port, host=self.host, access_log=access_log, **options)
         else:
-            raise Exception(f'Server {self.server} not recognized')
+            raise Exception(f"Server {self.server} not recognized")
diff --git a/firetail/apps/flask_app.py b/firetail/apps/flask_app.py
index ab0df12..9294887 100644
--- a/firetail/apps/flask_app.py
+++ b/firetail/apps/flask_app.py
@@ -17,11 +17,11 @@
 from ..problem import problem
 from .abstract import AbstractApp
 
-logger = logging.getLogger('firetail.app')
+logger = logging.getLogger("firetail.app")
 
 
 class FlaskApp(AbstractApp):
-    def __init__(self, import_name, server='flask', extra_files=None, **kwargs):
+    def __init__(self, import_name, server="flask", extra_files=None, **kwargs):
         """
         :param extra_files: additional files to be watched by the reloader, defaults to the swagger specs of added apis
         :type extra_files: list[str | pathlib.Path], optional
@@ -34,8 +34,8 @@ def __init__(self, import_name, server='flask', extra_files=None, **kwargs):
     def create_app(self):
         app = flask.Flask(self.import_name, **self.server_args)
         app.json_encoder = FlaskJSONEncoder
-        app.url_map.converters['float'] = NumberConverter
-        app.url_map.converters['int'] = IntegerConverter
+        app.url_map.converters["float"] = NumberConverter
+        app.url_map.converters["int"] = IntegerConverter
         return app
 
     def get_root_path(self):
@@ -54,17 +54,24 @@ def common_error_handler(self, exception):
         signals.got_request_exception.send(self.app, exception=exception)
         if isinstance(exception, ProblemException):
             response = problem(
-                status=exception.status, title=exception.title, detail=exception.detail,
-                type=exception.type, instance=exception.instance, headers=exception.headers,
-                ext=exception.ext)
+                status=exception.status,
+                title=exception.title,
+                detail=exception.detail,
+                type=exception.type,
+                instance=exception.instance,
+                headers=exception.headers,
+                ext=exception.ext,
+            )
         else:
             if not isinstance(exception, werkzeug.exceptions.HTTPException):
                 exception = werkzeug.exceptions.InternalServerError()
 
-            response = problem(title=exception.name,
-                               detail=exception.description,
-                               status=exception.code,
-                               headers=exception.get_headers())
+            response = problem(
+                title=exception.name,
+                detail=exception.description,
+                status=exception.code,
+                headers=exception.get_headers(),
+            )
 
         return FlaskApi.get_response(response)
 
@@ -79,13 +86,7 @@ def add_error_handler(self, error_code, function):
         # type: (int, FunctionType) -> None
         self.app.register_error_handler(error_code, function)
 
-    def run(self,
-            port=None,
-            server=None,
-            debug=None,
-            host=None,
-            extra_files=None,
-            **options):  # pragma: no cover
+    def run(self, port=None, server=None, debug=None, host=None, extra_files=None, **options):  # pragma: no cover
         """
         Runs the application on a local development server.
 
@@ -109,7 +110,7 @@ def run(self,
         elif self.port is None:
             self.port = 5000
 
-        self.host = host or self.host or '0.0.0.0'
+        self.host = host or self.host or "0.0.0.0"
 
         if server is not None:
             self.server = server
@@ -120,32 +121,31 @@ def run(self,
         if extra_files is not None:
             self.extra_files.extend(extra_files)
 
-        logger.debug('Starting %s HTTP server..', self.server, extra=vars(self))
-        if self.server == 'flask':
-            self.app.run(self.host, port=self.port, debug=self.debug,
-                         extra_files=self.extra_files, **options)
-        elif self.server == 'tornado':
+        logger.debug("Starting %s HTTP server..", self.server, extra=vars(self))
+        if self.server == "flask":
+            self.app.run(self.host, port=self.port, debug=self.debug, extra_files=self.extra_files, **options)
+        elif self.server == "tornado":
             try:
                 import tornado.httpserver
                 import tornado.ioloop
                 import tornado.wsgi
             except ImportError:
-                raise Exception('tornado library not installed')
+                raise Exception("tornado library not installed")
             wsgi_container = tornado.wsgi.WSGIContainer(self.app)
             http_server = tornado.httpserver.HTTPServer(wsgi_container, **options)
             http_server.listen(self.port, address=self.host)
-            logger.info('Listening on %s:%s..', self.host, self.port)
+            logger.info("Listening on %s:%s..", self.host, self.port)
             tornado.ioloop.IOLoop.instance().start()
-        elif self.server == 'gevent':
+        elif self.server == "gevent":
             try:
                 import gevent.pywsgi
             except ImportError:
-                raise Exception('gevent library not installed')
+                raise Exception("gevent library not installed")
             http_server = gevent.pywsgi.WSGIServer((self.host, self.port), self.app, **options)
-            logger.info('Listening on %s:%s..', self.host, self.port)
+            logger.info("Listening on %s:%s..", self.host, self.port)
             http_server.serve_forever()
         else:
-            raise Exception(f'Server {self.server} not recognized')
+            raise Exception(f"Server {self.server} not recognized")
 
 
 class FlaskJSONEncoder(json.JSONEncoder):
@@ -153,11 +153,11 @@ def default(self, o):
         if isinstance(o, datetime.datetime):
             if o.tzinfo:
                 # eg: '2015-09-25T23:14:42.588601+00:00'
-                return o.isoformat('T')
+                return o.isoformat("T")
             else:
                 # No timezone present - assume UTC.
                 # eg: '2015-09-25T23:14:42.588601Z'
-                return o.isoformat('T') + 'Z'
+                return o.isoformat("T") + "Z"
 
         if isinstance(o, datetime.date):
             return o.isoformat()
@@ -169,7 +169,8 @@ def default(self, o):
 
 
 class NumberConverter(werkzeug.routing.BaseConverter):
-    """ Flask converter for OpenAPI number type """
+    """Flask converter for OpenAPI number type"""
+
     regex = r"[+-]?[0-9]*(\.[0-9]*)?"
 
     def to_python(self, value):
@@ -177,7 +178,8 @@ def to_python(self, value):
 
 
 class IntegerConverter(werkzeug.routing.BaseConverter):
-    """ Flask converter for OpenAPI integer type """
+    """Flask converter for OpenAPI integer type"""
+
     regex = r"[+-]?[0-9]+"
 
     def to_python(self, value):
diff --git a/firetail/auditor.py b/firetail/auditor.py
index 5d4b3a9..efab401 100644
--- a/firetail/auditor.py
+++ b/firetail/auditor.py
@@ -14,20 +14,21 @@
 
 
 class cloud_logger(object):
-    def __init__(self,
-                 app,
-                 url=DEFAULT_LOG_ENDPOINT,
-                 debug=False,
-                 custom_backend=False,
-                 token=None,
-                 backup_logs=True,
-                 network_timeout=10.0,
-                 number_of_retries=4,
-                 retry_timeout=2,
-                 logs_drain_timeout=5,
-                 scrub_headers=['set-cookie', 'cookie', 'authorization', 'x-api-key', 'token', 'api-token', 'api-key'],
-                 enrich_oauth=True
-                 ):
+    def __init__(
+        self,
+        app,
+        url=DEFAULT_LOG_ENDPOINT,
+        debug=False,
+        custom_backend=False,
+        token=None,
+        backup_logs=True,
+        network_timeout=10.0,
+        number_of_retries=4,
+        retry_timeout=2,
+        logs_drain_timeout=5,
+        scrub_headers=["set-cookie", "cookie", "authorization", "x-api-key", "token", "api-token", "api-key"],
+        enrich_oauth=True,
+    ):
         self.startThread = True
         self.custom_backend = custom_backend
         self.requests_session = requests.Session()
@@ -46,34 +47,23 @@ def __init__(self,
         self.enrich_oauth = enrich_oauth
         self.scrub_headers = scrub_headers
         self.LOGGING = {
-            'version': 1,
-            'disable_existing_loggers': False,
-            'formatters': {
-                'firetailFormat': {
-                    'format': '{"additional_field": "value"}',
-                    'validate': False
+            "version": 1,
+            "disable_existing_loggers": False,
+            "formatters": {"firetailFormat": {"format": '{"additional_field": "value"}', "validate": False}},
+            "handlers": {
+                "firetail": {
+                    "class": "firetail.handlers.FiretailHandler",
+                    "level": "DEBUG",
+                    "formatter": "firetailFormat",
+                    "token": self.token,
+                    "custom_backend": self.custom_backend,
+                    "logs_drain_timeout": 5,
+                    "url": self.url,
+                    "retries_no": 4,
+                    "retry_timeout": 2,
                 }
             },
-            'handlers': {
-                'firetail': {
-                    'class': 'firetail.handlers.FiretailHandler',
-                    'level': 'DEBUG',
-                    'formatter': 'firetailFormat',
-                    'token': self.token,
-                    'custom_backend': self.custom_backend,
-                    'logs_drain_timeout': 5,
-                    'url': self.url,
-                    'retries_no': 4,
-                    'retry_timeout': 2,
-                }
-            },
-            'loggers': {
-                '': {
-                    'level': 'DEBUG',
-                    'handlers': ['firetail'],
-                    'propagate': True
-                }
-            }
+            "loggers": {"": {"level": "DEBUG", "handlers": ["firetail"], "propagate": True}},
         }
         if app:
             self.init_app(app, token)
@@ -88,23 +78,23 @@ def set_token(self, token_secret):
         self.token = token_secret
 
     def sha1_hash(self, value):
-        hash_object = hashlib.sha1(value.encode('utf-8'))
+        hash_object = hashlib.sha1(value.encode("utf-8"))
         return "sha1:" + hash_object.hexdigest()
 
     def clean_pii(self, payload):
         clean_headers = self.scrub_headers
-        if 'req' in payload and 'headers' in payload['req']:
-            for k, v in payload['req']['headers'].items():
+        if "req" in payload and "headers" in payload["req"]:
+            for k, v in payload["req"]["headers"].items():
                 if k.lower() in clean_headers:
-                    if k.lower() == 'authorization' and 'bearer ' in v.lower():
+                    if k.lower() == "authorization" and "bearer " in v.lower():
                         self.oauth = True
                         v = v.split(" ")[1]
                         self.auth_token = v
-                    payload['req']['headers'][k] = self.sha1_hash(v)
-        if 'res' in payload and 'headers' in payload['res']:
-            for k, v in payload['res']['headers'].items():
+                    payload["req"]["headers"][k] = self.sha1_hash(v)
+        if "res" in payload and "headers" in payload["res"]:
+            for k, v in payload["res"]["headers"].items():
                 if k.lower() in clean_headers:
-                    payload['req']['headers'][k] = self.sha1_hash(v)
+                    payload["req"]["headers"][k] = self.sha1_hash(v)
 
         if self.oauth and self.enrich_oauth:
             try:
@@ -112,9 +102,9 @@ def clean_pii(self, payload):
             except jwt.exceptions.DecodeError:
                 self.oauth = False
             if self.oauth:
-                payload['oauth'] = {'sub': jwt_decoded['sub']}
-                if 'email' in jwt_decoded:
-                    payload['oauth']['email'] = jwt_decoded['email']
+                payload["oauth"] = {"sub": jwt_decoded["sub"]}
+                if "email" in jwt_decoded:
+                    payload["oauth"]["email"] = jwt_decoded["email"]
         return payload
 
     def format_headers(self, req_headers):
@@ -130,11 +120,11 @@ def create(self, response, token, diff=-1, scrub_headers=None, debug=False):
             self.scrub_headers = scrub_headers
         self.token = token
         if not self.logger:
-            self.LOGGING['handlers']['firetail']['token'] = token
+            self.LOGGING["handlers"]["firetail"]["token"] = token
             logging.config.dictConfig(self.LOGGING)
-            self.logger = logging.getLogger('firetailLogger')
+            self.logger = logging.getLogger("firetailLogger")
         try:
-            response_data = response.get_json() if response.is_json else str(response.response[0].decode('utf-8'))
+            response_data = response.get_json() if response.is_json else str(response.response[0].decode("utf-8"))
         except Exception:
             response_data = ""
         payload = {
@@ -142,18 +132,18 @@ def create(self, response, token, diff=-1, scrub_headers=None, debug=False):
             "dateCreated": int(time.time() * 1000),
             "executionTime": diff,
             "request": {
-                "httpProtocol": request.environ.get('SERVER_PROTOCOL', "HTTP/1.1"),
+                "httpProtocol": request.environ.get("SERVER_PROTOCOL", "HTTP/1.1"),
                 "uri": request.url,
                 "headers": self.format_headers(dict(request.headers)),
-                "resource":  request.url_rule.rule if request.url_rule is not None else request.path,
+                "resource": request.url_rule.rule if request.url_rule is not None else request.path,
                 "method": request.method,
                 "body": str(request.data),
-                "ip": request.remote_addr
+                "ip": request.remote_addr,
             },
             "response": {
                 "statusCode": response.status_code,
                 "body": str(response_data),
-                "headers": self.format_headers(dict(response.headers))
+                "headers": self.format_headers(dict(response.headers)),
             },
         }
         try:
@@ -170,6 +160,7 @@ def logs_after_request(resp):
         time_diff = diff * 1000
         cl.create(resp, token, round(time_diff, 2))
         return resp
+
     return logs_after_request
 
 
diff --git a/firetail/cli.py b/firetail/cli.py
index e7d6914..ec89e56 100644
--- a/firetail/cli.py
+++ b/firetail/cli.py
@@ -13,37 +13,26 @@
 import firetail
 from firetail.mock import MockResolver
 
-logger = logging.getLogger('firetail.cli')
-CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
-FLASK_APP = 'flask'
-AIOHTTP_APP = 'aiohttp'
-AVAILABLE_SERVERS = {
-    'flask': [FLASK_APP],
-    'gevent': [FLASK_APP],
-    'tornado': [FLASK_APP],
-    'aiohttp': [AIOHTTP_APP]
-}
-AVAILABLE_APPS = {
-    FLASK_APP: 'firetail.apps.flask_app.FlaskApp',
-    AIOHTTP_APP: 'firetail.apps.aiohttp_app.AioHttpApp'
-}
-DEFAULT_SERVERS = {
-    FLASK_APP: FLASK_APP,
-    AIOHTTP_APP: AIOHTTP_APP
-}
+logger = logging.getLogger("firetail.cli")
+CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
+FLASK_APP = "flask"
+AIOHTTP_APP = "aiohttp"
+AVAILABLE_SERVERS = {"flask": [FLASK_APP], "gevent": [FLASK_APP], "tornado": [FLASK_APP], "aiohttp": [AIOHTTP_APP]}
+AVAILABLE_APPS = {FLASK_APP: "firetail.apps.flask_app.FlaskApp", AIOHTTP_APP: "firetail.apps.aiohttp_app.AioHttpApp"}
+DEFAULT_SERVERS = {FLASK_APP: FLASK_APP, AIOHTTP_APP: AIOHTTP_APP}
 
 
 def validate_server_requirements(ctx, param, value):
-    if value == 'gevent':
+    if value == "gevent":
         try:
             import gevent  # NOQA
         except ImportError:
-            fatal_error('gevent library is not installed')
-    elif value == 'tornado':
+            fatal_error("gevent library is not installed")
+    elif value == "tornado":
         try:
             import tornado  # NOQA
         except ImportError:
-            fatal_error('tornado library is not installed')
+            fatal_error("tornado library is not installed")
     else:
         return value
 
@@ -51,82 +40,110 @@ def validate_server_requirements(ctx, param, value):
 def print_version(ctx, param, value):
     if not value or ctx.resilient_parsing:
         return
-    click.echo(f'Firetail {firetail.__version__}')
+    click.echo(f"Firetail {firetail.__version__}")
     ctx.exit()
 
 
 @click.group(cls=AliasedGroup, context_settings=CONTEXT_SETTINGS)
-@click.option('-V', '--version', is_flag=True, callback=print_version, expose_value=False, is_eager=True,
-              help='Print the current version number and exit.')
+@click.option(
+    "-V",
+    "--version",
+    is_flag=True,
+    callback=print_version,
+    expose_value=False,
+    is_eager=True,
+    help="Print the current version number and exit.",
+)
 def main():
     pass
 
 
 @main.command()
-@click.argument('spec_file')
-@click.argument('base_module_path', required=False)
-@click.option('--port', '-p', default=5000, type=int, help='Port to listen.')
-@click.option('--host', '-H', type=str, help='Host interface to bind on.')
-@click.option('--wsgi-server', '-w',
-              type=click.Choice(AVAILABLE_SERVERS.keys()),
-              callback=validate_server_requirements,
-              help='Which WSGI server container to use. (deprecated, use --server instead)')
-@click.option('--server', '-s',
-              type=click.Choice(AVAILABLE_SERVERS.keys()),
-              callback=validate_server_requirements,
-              help='Which server container to use.')
-@click.option('--stub',
-              help='Returns status code 501, and `Not Implemented Yet` payload, for '
-              'the endpoints which handlers are not found.',
-              is_flag=True, default=False)
-@click.option('--mock', type=click.Choice(['all', 'notimplemented']),
-              help='Returns example data for all endpoints or for which handlers are not found.')
-@click.option('--hide-spec',
-              help='Hides the API spec in JSON format which is by default available at `/swagger.json`.',
-              is_flag=True, default=False)
-@click.option('--hide-console-ui',
-              help='Hides the the API console UI which is by default available at `/ui`.',
-              is_flag=True, default=False)
-@click.option('--console-ui-url', metavar='URL',
-              help='Personalize what URL path the API console UI will be mounted.')
-@click.option('--console-ui-from', metavar='PATH',
-              help='Path to a customized API console UI dashboard.')
-@click.option('--auth-all-paths',
-              help='Enable authentication to paths not defined in the spec.',
-              is_flag=True, default=False)
-@click.option('--validate-responses',
-              help='Enable validation of response values from operation handlers.',
-              is_flag=True, default=False)
-@click.option('--strict-validation',
-              help='Enable strict validation of request payloads.',
-              is_flag=True, default=False)
-@click.option('--debug', '-d', help='Show debugging information.',
-              is_flag=True, default=False)
-@click.option('--verbose', '-v', help='Show verbose information.', count=True)
-@click.option('--base-path', metavar='PATH',
-              help='Override the basePath in the API spec.')
-@click.option('--app-framework', '-f', default=FLASK_APP,
-              type=click.Choice(AVAILABLE_APPS.keys()),
-              help='The app framework used to run the server')
-def run(spec_file,
-        base_module_path,
-        port,
-        host,
-        wsgi_server,
-        server,
-        stub,
-        mock,
-        hide_spec,
-        hide_console_ui,
-        console_ui_url,
-        console_ui_from,
-        auth_all_paths,
-        validate_responses,
-        strict_validation,
-        debug,
-        verbose,
-        base_path,
-        app_framework):
+@click.argument("spec_file")
+@click.argument("base_module_path", required=False)
+@click.option("--port", "-p", default=5000, type=int, help="Port to listen.")
+@click.option("--host", "-H", type=str, help="Host interface to bind on.")
+@click.option(
+    "--wsgi-server",
+    "-w",
+    type=click.Choice(AVAILABLE_SERVERS.keys()),
+    callback=validate_server_requirements,
+    help="Which WSGI server container to use. (deprecated, use --server instead)",
+)
+@click.option(
+    "--server",
+    "-s",
+    type=click.Choice(AVAILABLE_SERVERS.keys()),
+    callback=validate_server_requirements,
+    help="Which server container to use.",
+)
+@click.option(
+    "--stub",
+    help="Returns status code 501, and `Not Implemented Yet` payload, for "
+    "the endpoints which handlers are not found.",
+    is_flag=True,
+    default=False,
+)
+@click.option(
+    "--mock",
+    type=click.Choice(["all", "notimplemented"]),
+    help="Returns example data for all endpoints or for which handlers are not found.",
+)
+@click.option(
+    "--hide-spec",
+    help="Hides the API spec in JSON format which is by default available at `/swagger.json`.",
+    is_flag=True,
+    default=False,
+)
+@click.option(
+    "--hide-console-ui",
+    help="Hides the the API console UI which is by default available at `/ui`.",
+    is_flag=True,
+    default=False,
+)
+@click.option("--console-ui-url", metavar="URL", help="Personalize what URL path the API console UI will be mounted.")
+@click.option("--console-ui-from", metavar="PATH", help="Path to a customized API console UI dashboard.")
+@click.option(
+    "--auth-all-paths", help="Enable authentication to paths not defined in the spec.", is_flag=True, default=False
+)
+@click.option(
+    "--validate-responses",
+    help="Enable validation of response values from operation handlers.",
+    is_flag=True,
+    default=False,
+)
+@click.option("--strict-validation", help="Enable strict validation of request payloads.", is_flag=True, default=False)
+@click.option("--debug", "-d", help="Show debugging information.", is_flag=True, default=False)
+@click.option("--verbose", "-v", help="Show verbose information.", count=True)
+@click.option("--base-path", metavar="PATH", help="Override the basePath in the API spec.")
+@click.option(
+    "--app-framework",
+    "-f",
+    default=FLASK_APP,
+    type=click.Choice(AVAILABLE_APPS.keys()),
+    help="The app framework used to run the server",
+)
+def run(
+    spec_file,
+    base_module_path,
+    port,
+    host,
+    wsgi_server,
+    server,
+    stub,
+    mock,
+    hide_spec,
+    hide_console_ui,
+    console_ui_url,
+    console_ui_from,
+    auth_all_paths,
+    validate_responses,
+    strict_validation,
+    debug,
+    verbose,
+    base_path,
+    app_framework,
+):
     """
     Runs a server compliant with a OpenAPI/Swagger 2.0 Specification file.
 
@@ -137,10 +154,7 @@ def run(spec_file,
     - BASE_MODULE_PATH (optional): filesystem path where the API endpoints handlers are going to be imported from.
     """
     if wsgi_server and server:
-        raise click.BadParameter(
-            "these options are mutually exclusive",
-            param_hint="'wsgi-server' and 'server'"
-        )
+        raise click.BadParameter("these options are mutually exclusive", param_hint="'wsgi-server' and 'server'")
     elif wsgi_server:
         server = wsgi_server
 
@@ -148,16 +162,14 @@ def run(spec_file,
         server = DEFAULT_SERVERS[app_framework]
 
     if app_framework not in AVAILABLE_SERVERS[server]:
-        message = "Invalid server '{}' for app-framework '{}'".format(
-            server, app_framework
-        )
+        message = "Invalid server '{}' for app-framework '{}'".format(server, app_framework)
         raise click.UsageError(message)
 
     if app_framework == AIOHTTP_APP:
         try:
             import aiohttp  # NOQA
         except Exception:
-            fatal_error('aiohttp library is not installed')
+            fatal_error("aiohttp library is not installed")
 
     logging_level = logging.WARN
     if verbose > 0:
@@ -172,7 +184,7 @@ def run(spec_file,
     spec_file_full_path = path.abspath(spec_file)
     py_module_path = base_module_path or path.dirname(spec_file_full_path)
     sys.path.insert(1, path.abspath(py_module_path))
-    logger.debug(f'Added {py_module_path} to system path.')
+    logger.debug(f"Added {py_module_path} to system path.")
 
     resolver_error = None
     if stub:
@@ -180,37 +192,31 @@ def run(spec_file,
 
     api_extra_args = {}
     if mock:
-        resolver = MockResolver(mock_all=mock == 'all')
-        api_extra_args['resolver'] = resolver
+        resolver = MockResolver(mock_all=mock == "all")
+        api_extra_args["resolver"] = resolver
 
-    app_cls = firetail.utils.get_function_from_name(
-      AVAILABLE_APPS[app_framework]
-    )
+    app_cls = firetail.utils.get_function_from_name(AVAILABLE_APPS[app_framework])
 
     options = {
         "serve_spec": not hide_spec,
         "swagger_path": console_ui_from or None,
         "swagger_ui": not hide_console_ui,
-        "swagger_url": console_ui_url or None
+        "swagger_url": console_ui_url or None,
     }
 
-    app = app_cls(__name__,
-                  debug=debug,
-                  auth_all_paths=auth_all_paths,
-                  options=options)
+    app = app_cls(__name__, debug=debug, auth_all_paths=auth_all_paths, options=options)
 
-    app.add_api(spec_file_full_path,
-                base_path=base_path,
-                resolver_error=resolver_error,
-                validate_responses=validate_responses,
-                strict_validation=strict_validation,
-                **api_extra_args)
+    app.add_api(
+        spec_file_full_path,
+        base_path=base_path,
+        resolver_error=resolver_error,
+        validate_responses=validate_responses,
+        strict_validation=strict_validation,
+        **api_extra_args,
+    )
 
-    app.run(port=port,
-            host=host,
-            server=server,
-            debug=debug)
+    app.run(port=port, host=host, server=server, debug=debug)
 
 
-if __name__ == '__main__':  # pragma: no cover
+if __name__ == "__main__":  # pragma: no cover
     main()
diff --git a/firetail/decorators/decorator.py b/firetail/decorators/decorator.py
index 681851a..d2c704c 100644
--- a/firetail/decorators/decorator.py
+++ b/firetail/decorators/decorator.py
@@ -9,11 +9,10 @@
 
 from ..utils import has_coroutine
 
-logger = logging.getLogger('firetail.decorators.decorator')
+logger = logging.getLogger("firetail.decorators.decorator")
 
 
 class BaseDecorator:
-
     def __call__(self, function):
         """
         :type function: types.FunctionType
@@ -25,7 +24,7 @@ def __repr__(self):  # pragma: no cover
         """
         :rtype: str
         """
-        return '<BaseDecorator>'
+        return "<BaseDecorator>"
 
 
 class RequestResponseDecorator(BaseDecorator):
@@ -44,6 +43,7 @@ def __call__(self, function):
         :rtype: types.FunctionType
         """
         if has_coroutine(function, self.api):
+
             @functools.wraps(function)
             async def wrapper(*args, **kwargs):
                 firetail_request = self.api.get_request(*args, **kwargs)
@@ -54,14 +54,14 @@ async def wrapper(*args, **kwargs):
                 while asyncio.iscoroutine(firetail_response):
                     firetail_response = await firetail_response
 
-                framework_response = self.api.get_response(firetail_response, self.mimetype,
-                                                           firetail_request)
+                framework_response = self.api.get_response(firetail_response, self.mimetype, firetail_request)
                 while asyncio.iscoroutine(framework_response):
                     framework_response = await framework_response
 
                 return framework_response
 
         else:  # pragma: no cover
+
             @functools.wraps(function)
             def wrapper(*args, **kwargs):
                 request = self.api.get_request(*args, **kwargs)
diff --git a/firetail/decorators/metrics.py b/firetail/decorators/metrics.py
index 3b4c776..6be1463 100644
--- a/firetail/decorators/metrics.py
+++ b/firetail/decorators/metrics.py
@@ -13,6 +13,7 @@
 
 try:
     import uwsgi_metrics
+
     HAS_UWSGI_METRICS = True  # pragma: no cover
 except ImportError:
     uwsgi_metrics = None
@@ -23,9 +24,9 @@ class UWSGIMetricsCollector:
     def __init__(self, path, method):
         self.path = path
         self.method = method
-        swagger_path = path.strip('/').replace('/', '.').replace('<', '{').replace('>', '}')
-        self.key_suffix = f'{method.upper()}.{swagger_path}'
-        self.prefix = os.getenv('HTTP_METRICS_PREFIX', 'firetail.response')
+        swagger_path = path.strip("/").replace("/", ".").replace("<", "{").replace(">", "}")
+        self.key_suffix = f"{method.upper()}.{swagger_path}"
+        self.prefix = os.getenv("HTTP_METRICS_PREFIX", "firetail.response")
 
     @staticmethod
     def is_available():
@@ -54,7 +55,7 @@ def wrapper(*args, **kwargs):
                 end_time_s = time.time()
                 delta_s = end_time_s - start_time_s
                 delta_ms = delta_s * 1000
-                key = f'{status}.{self.key_suffix}'
+                key = f"{status}.{self.key_suffix}"
                 uwsgi_metrics.timer(self.prefix, key, delta_ms)
             return response
 
diff --git a/firetail/decorators/parameter.py b/firetail/decorators/parameter.py
index 1426a3d..c8c09da 100644
--- a/firetail/decorators/parameter.py
+++ b/firetail/decorators/parameter.py
@@ -28,8 +28,7 @@ def inspect_function_arguments(function):  # pragma: no cover
     :rtype: tuple[list[str], bool]
     """
     parameters = inspect.signature(function).parameters
-    bound_arguments = [name for name, p in parameters.items()
-                       if p.kind not in (p.VAR_POSITIONAL, p.VAR_KEYWORD)]
+    bound_arguments = [name for name, p in parameters.items() if p.kind not in (p.VAR_POSITIONAL, p.VAR_KEYWORD)]
     has_kwargs = any(p.kind == p.VAR_KEYWORD for p in parameters.values())
     return list(bound_arguments), has_kwargs
 
@@ -49,9 +48,7 @@ def snake_and_shadow(name):
 
 
 def sanitized(name):
-    return name and re.sub('^[^a-zA-Z_]+', '',
-                           re.sub('[^0-9a-zA-Z_]', '',
-                                  re.sub(r'\[(?!])', '_', name)))
+    return name and re.sub("^[^a-zA-Z_]+", "", re.sub("[^0-9a-zA-Z_]", "", re.sub(r"\[(?!])", "_", name)))
 
 
 def pythonic(name):
@@ -59,8 +56,7 @@ def pythonic(name):
     return sanitized(name)
 
 
-def parameter_to_arg(operation, function, pythonic_params=False,
-                     pass_context_arg_name=None):
+def parameter_to_arg(operation, function, pythonic_params=False, pass_context_arg_name=None):
     """
     Pass query and body parameters as keyword arguments to handler function.
 
@@ -82,7 +78,7 @@ def parameter_to_arg(operation, function, pythonic_params=False,
     @functools.wraps(function)
     def wrapper(request):
         # type: (FiretailRequest) -> Any
-        logger.debug('Function Arguments: %s', arguments)
+        logger.debug("Function Arguments: %s", arguments)
         kwargs = {}
 
         if all_json(consumes):
@@ -98,8 +94,9 @@ def wrapper(request):
             query = dict(request.query.items())
 
         kwargs.update(
-            operation.get_arguments(request.path_params, query, request_body,
-                                    request.files, arguments, has_kwargs, sanitize)
+            operation.get_arguments(
+                request.path_params, query, request_body, request.files, arguments, has_kwargs, sanitize
+            )
         )
 
         # optionally convert parameter variable names to un-shadowed, snake_case form
diff --git a/firetail/decorators/produces.py b/firetail/decorators/produces.py
index ba012a2..59ab8b1 100644
--- a/firetail/decorators/produces.py
+++ b/firetail/decorators/produces.py
@@ -7,7 +7,7 @@
 
 from .decorator import BaseDecorator
 
-logger = logging.getLogger('firetail.decorators.produces')
+logger = logging.getLogger("firetail.decorators.produces")
 
 # special marker object to return empty content for any status code
 # e.g. in app method do "return NoContent, 201"
@@ -15,7 +15,7 @@
 
 
 class BaseSerializer(BaseDecorator):
-    def __init__(self, mimetype='text/plain'):
+    def __init__(self, mimetype="text/plain"):
         """
         :type mimetype: str
         """
@@ -25,7 +25,7 @@ def __repr__(self):
         """
         :rtype: str
         """
-        return f'<BaseSerializer: {self.mimetype}>'  # pragma: no cover
+        return f"<BaseSerializer: {self.mimetype}>"  # pragma: no cover
 
 
 class Produces(BaseSerializer):
@@ -39,8 +39,7 @@ def __call__(self, function):
         def wrapper(request):
             url = request.url
             response = function(request)
-            logger.debug('Returning %s', url,
-                         extra={'url': url, 'mimetype': self.mimetype})
+            logger.debug("Returning %s", url, extra={"url": url, "mimetype": self.mimetype})
             return response
 
         return wrapper
@@ -49,4 +48,4 @@ def __repr__(self):
         """
         :rtype: str
         """
-        return f'<Produces: {self.mimetype}>'  # pragma: no cover
+        return f"<Produces: {self.mimetype}>"  # pragma: no cover
diff --git a/firetail/decorators/response.py b/firetail/decorators/response.py
index 120dfa9..c0e6f4b 100644
--- a/firetail/decorators/response.py
+++ b/firetail/decorators/response.py
@@ -13,7 +13,7 @@
 from .decorator import BaseDecorator
 from .validation import ResponseBodyValidator
 
-logger = logging.getLogger('firetail.decorators.response')
+logger = logging.getLogger("firetail.decorators.response")
 
 
 class ResponseValidator(BaseDecorator):
@@ -54,14 +54,14 @@ def validate_response(self, data, status_code, headers, url):
                 raise NonConformingResponseBody(message=str(e))
 
         if response_definition and response_definition.get("headers"):
-            required_header_keys = {k for (k, v) in response_definition.get("headers").items()
-                                    if v.get("required", False)}
+            required_header_keys = {
+                k for (k, v) in response_definition.get("headers").items() if v.get("required", False)
+            }
             header_keys = set(headers.keys())
             missing_keys = required_header_keys - header_keys
             if missing_keys:
-                pretty_list = ', '.join(missing_keys)
-                msg = ("Keys in header don't match response specification. "
-                       "Difference: {}").format(pretty_list)
+                pretty_list = ", ".join(missing_keys)
+                msg = ("Keys in header don't match response specification. " "Difference: {}").format(pretty_list)
                 raise NonConformingResponseHeaders(message=msg)
         return True
 
@@ -76,7 +76,7 @@ def is_json_schema_compatible(self, response_schema: dict) -> bool:
         """
         if not response_schema:
             return False
-        return all_json([self.mimetype]) or self.mimetype == 'text/plain'
+        return all_json([self.mimetype]) or self.mimetype == "text/plain"
 
     def __call__(self, function):
         """
@@ -85,18 +85,18 @@ def __call__(self, function):
         """
 
         def _wrapper(request, response):
-            firetail_response = \
-                self.operation.api.get_firetail_response(response, self.mimetype)
+            firetail_response = self.operation.api.get_firetail_response(response, self.mimetype)
             if not firetail_response.is_streamed:
                 self.validate_response(
-                    firetail_response.body, firetail_response.status_code,
-                    firetail_response.headers, request.url)
+                    firetail_response.body, firetail_response.status_code, firetail_response.headers, request.url
+                )
             else:
                 logger.warning("Skipping response validation for streamed response.")
 
             return response
 
         if has_coroutine(function):
+
             @functools.wraps(function)
             async def wrapper(request):
                 response = function(request)
@@ -106,6 +106,7 @@ async def wrapper(request):
                 return _wrapper(request, response)
 
         else:  # pragma: no cover
+
             @functools.wraps(function)
             def wrapper(request):
                 response = function(request)
@@ -117,4 +118,4 @@ def __repr__(self):
         """
         :rtype: str
         """
-        return '<ResponseValidator>'  # pragma: no cover
+        return "<ResponseValidator>"  # pragma: no cover
diff --git a/firetail/decorators/uri_parsing.py b/firetail/decorators/uri_parsing.py
index 38e22cc..3fcba19 100644
--- a/firetail/decorators/uri_parsing.py
+++ b/firetail/decorators/uri_parsing.py
@@ -11,14 +11,9 @@
 from .. import utils
 from .decorator import BaseDecorator
 
-logger = logging.getLogger('firetail.decorators.uri_parsing')
+logger = logging.getLogger("firetail.decorators.uri_parsing")
 
-QUERY_STRING_DELIMITERS = {
-    'spaceDelimited': ' ',
-    'pipeDelimited': '|',
-    'simple': ',',
-    'form': ','
-}
+QUERY_STRING_DELIMITERS = {"spaceDelimited": " ", "pipeDelimited": "|", "simple": ",", "form": ","}
 
 
 class AbstractURIParser(BaseDecorator, metaclass=abc.ABCMeta):
@@ -35,9 +30,7 @@ def __init__(self, param_defns, body_defn):
         - https://mysite.fake/?in_query=a|b|c           # various separators
         - https://mysite.fake/?in_query=a&in_query=b,c  # complex query params
         """
-        self._param_defns = {p["name"]: p
-                             for p in param_defns
-                             if p["in"] in self.parsable_parameters}
+        self._param_defns = {p["name"]: p for p in param_defns if p["in"] in self.parsable_parameters}
         self._body_schema = body_defn.get("schema", {})
         self._body_encoding = body_defn.get("encoding", {})
 
@@ -59,30 +52,26 @@ def __repr__(self):
         """
         :rtype: str
         """
-        return "<{classname}>".format(
-            classname=self.__class__.__name__)  # pragma: no cover
+        return "<{classname}>".format(classname=self.__class__.__name__)  # pragma: no cover
 
     @abc.abstractmethod
     def resolve_form(self, form_data):
-        """ Resolve cases where form parameters are provided multiple times.
-        """
+        """Resolve cases where form parameters are provided multiple times."""
 
     @abc.abstractmethod
     def resolve_query(self, query_data):
-        """ Resolve cases where query parameters are provided multiple times.
-        """
+        """Resolve cases where query parameters are provided multiple times."""
 
     @abc.abstractmethod
     def resolve_path(self, path):
-        """ Resolve cases where path parameters include lists
-        """
+        """Resolve cases where path parameters include lists"""
 
     @abc.abstractmethod
     def _resolve_param_duplicates(self, values, param_defn, _in):
-        """ Resolve cases where query parameters are provided multiple times.
-            For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
-            `a` could be "4,5,6", or "1,2,3" or "1,2,3,4,5,6" depending on the
-            implementation.
+        """Resolve cases where query parameters are provided multiple times.
+        For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
+        `a` could be "4,5,6", or "1,2,3" or "1,2,3,4,5,6" depending on the
+        implementation.
         """
 
     @abc.abstractmethod
@@ -109,11 +98,11 @@ def resolve_params(self, params, _in):
                 resolved_param[k] = values
                 continue
 
-            if _in == 'path':
+            if _in == "path":
                 # multiple values in a path is impossible
                 values = [values]
 
-            if param_schema and param_schema['type'] == 'array':
+            if param_schema and param_schema["type"] == "array":
                 # resolve variable re-assignment, handle explode
                 values = self._resolve_param_duplicates(values, param_defn, _in)
                 # handle array styles
@@ -132,8 +121,7 @@ def __call__(self, function):
         @functools.wraps(function)
         def wrapper(request):
             def coerce_dict(md):
-                """ MultiDict -> dict of lists
-                """
+                """MultiDict -> dict of lists"""
                 try:
                     return md.to_dict(flat=False)
                 except AttributeError:
@@ -153,9 +141,7 @@ def coerce_dict(md):
 
 
 class OpenAPIURIParser(AbstractURIParser):
-    style_defaults = {"path": "simple", "header": "simple",
-                      "query": "form", "cookie": "form",
-                      "form": "form"}
+    style_defaults = {"path": "simple", "header": "simple", "query": "form", "cookie": "form", "form": "form"}
 
     @property
     def param_defns(self):
@@ -163,30 +149,29 @@ def param_defns(self):
 
     @property
     def form_defns(self):
-        return {k: v for k, v in self._body_schema.get('properties', {}).items()}
+        return {k: v for k, v in self._body_schema.get("properties", {}).items()}
 
     @property
     def param_schemas(self):
-        return {k: v.get('schema', {}) for k, v in self.param_defns.items()}
+        return {k: v.get("schema", {}) for k, v in self.param_defns.items()}
 
     def resolve_form(self, form_data):
-        if self._body_schema is None or self._body_schema.get('type') != 'object':
+        if self._body_schema is None or self._body_schema.get("type") != "object":
             return form_data
         for k in form_data:
             encoding = self._body_encoding.get(k, {"style": "form"})
             defn = self.form_defns.get(k, {})
             # TODO support more form encoding styles
-            form_data[k] = \
-                self._resolve_param_duplicates(form_data[k], encoding, 'form')
+            form_data[k] = self._resolve_param_duplicates(form_data[k], encoding, "form")
             if defn and defn["type"] == "array":
-                form_data[k] = self._split(form_data[k], encoding, 'form')
-            elif 'contentType' in encoding and utils.all_json([encoding.get('contentType')]):
+                form_data[k] = self._split(form_data[k], encoding, "form")
+            elif "contentType" in encoding and utils.all_json([encoding.get("contentType")]):
                 form_data[k] = json.loads(form_data[k])
         return form_data
 
     def _make_deep_object(self, k, v):
-        """ consumes keys, value pairs like (a[foo][bar], "baz")
-            returns (a, {"foo": {"bar": "baz"}}}, is_deep_object)
+        """consumes keys, value pairs like (a[foo][bar], "baz")
+        returns (a, {"foo": {"bar": "baz"}}}, is_deep_object)
         """
         root_key = None
         if k in self.param_schemas.keys():
@@ -194,7 +179,7 @@ def _make_deep_object(self, k, v):
         else:
             for key in self.param_schemas.keys():
                 if k.startswith(key) and "[" in k:
-                    root_key = key.replace(k, '')
+                    root_key = key.replace(k, "")
 
         if not root_key:
             root_key = k.split("[", 1)[0]
@@ -204,7 +189,7 @@ def _make_deep_object(self, k, v):
         if not self._is_deep_object_style_param(root_key):
             return k, v, False
 
-        key_path = re.findall(r'\[([^\[\]]*)\]', k)
+        key_path = re.findall(r"\[([^\[\]]*)\]", k)
         root = prev = node = {}
         for k in key_path:
             node[k] = {}
@@ -215,12 +200,12 @@ def _make_deep_object(self, k, v):
 
     def _is_deep_object_style_param(self, param_name):
         default_style = self.style_defaults["query"]
-        style = self.param_defns.get(param_name, {}).get('style', default_style)
+        style = self.param_defns.get(param_name, {}).get("style", default_style)
         return style == "deepObject"
 
     def _preprocess_deep_objects(self, query_data):
-        """ deep objects provide a way of rendering nested objects using query
-            parameters.
+        """deep objects provide a way of rendering nested objects using query
+        parameters.
         """
         deep = [self._make_deep_object(k, v) for k, v in query_data.items()]
         root_keys = [k for k, v, is_deep_object in deep]
@@ -234,25 +219,25 @@ def _preprocess_deep_objects(self, query_data):
 
     def resolve_query(self, query_data):
         query_data = self._preprocess_deep_objects(query_data)
-        return self.resolve_params(query_data, 'query')
+        return self.resolve_params(query_data, "query")
 
     def resolve_path(self, path_data):
-        return self.resolve_params(path_data, 'path')
+        return self.resolve_params(path_data, "path")
 
     @staticmethod
     def _resolve_param_duplicates(values, param_defn, _in):
-        """ Resolve cases where query parameters are provided multiple times.
-            The default behavior is to use the first-defined value.
-            For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
-            `a` would be "4,5,6".
-            However, if 'explode' is 'True' then the duplicate values
-            are concatenated together and `a` would be "1,2,3,4,5,6".
+        """Resolve cases where query parameters are provided multiple times.
+        The default behavior is to use the first-defined value.
+        For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
+        `a` would be "4,5,6".
+        However, if 'explode' is 'True' then the duplicate values
+        are concatenated together and `a` would be "1,2,3,4,5,6".
         """
         default_style = OpenAPIURIParser.style_defaults[_in]
-        style = param_defn.get('style', default_style)
-        delimiter = QUERY_STRING_DELIMITERS.get(style, ',')
-        is_form = (style == 'form')
-        explode = param_defn.get('explode', is_form)
+        style = param_defn.get("style", default_style)
+        delimiter = QUERY_STRING_DELIMITERS.get(style, ",")
+        is_form = style == "form"
+        explode = param_defn.get("explode", is_form)
         if explode:
             return delimiter.join(values)
 
@@ -262,8 +247,8 @@ def _resolve_param_duplicates(values, param_defn, _in):
     @staticmethod
     def _split(value, param_defn, _in):
         default_style = OpenAPIURIParser.style_defaults[_in]
-        style = param_defn.get('style', default_style)
-        delimiter = QUERY_STRING_DELIMITERS.get(style, ',')
+        style = param_defn.get("style", default_style)
+        delimiter = QUERY_STRING_DELIMITERS.get(style, ",")
         return value.split(delimiter)
 
 
@@ -272,6 +257,7 @@ class Swagger2URIParser(AbstractURIParser):
     Adheres to the Swagger2 spec,
     Assumes the the last defined query parameter should be used.
     """
+
     parsable_parameters = ["query", "path", "formData"]
 
     @property
@@ -283,33 +269,33 @@ def param_schemas(self):
         return self._param_defns  # swagger2 conflates defn and schema
 
     def resolve_form(self, form_data):
-        return self.resolve_params(form_data, 'form')
+        return self.resolve_params(form_data, "form")
 
     def resolve_query(self, query_data):
-        return self.resolve_params(query_data, 'query')
+        return self.resolve_params(query_data, "query")
 
     def resolve_path(self, path_data):
-        return self.resolve_params(path_data, 'path')
+        return self.resolve_params(path_data, "path")
 
     @staticmethod
     def _resolve_param_duplicates(values, param_defn, _in):
-        """ Resolve cases where query parameters are provided multiple times.
-            The default behavior is to use the first-defined value.
-            For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
-            `a` would be "4,5,6".
-            However, if 'collectionFormat' is 'multi' then the duplicate values
-            are concatenated together and `a` would be "1,2,3,4,5,6".
+        """Resolve cases where query parameters are provided multiple times.
+        The default behavior is to use the first-defined value.
+        For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
+        `a` would be "4,5,6".
+        However, if 'collectionFormat' is 'multi' then the duplicate values
+        are concatenated together and `a` would be "1,2,3,4,5,6".
         """
-        if param_defn.get('collectionFormat') == 'multi':
-            return ','.join(values)
+        if param_defn.get("collectionFormat") == "multi":
+            return ",".join(values)
         # default to last defined value
         return values[-1]
 
     @staticmethod
     def _split(value, param_defn, _in):
-        if param_defn.get("collectionFormat") == 'pipes':
-            return value.split('|')
-        return value.split(',')
+        if param_defn.get("collectionFormat") == "pipes":
+            return value.split("|")
+        return value.split(",")
 
 
 class FirstValueURIParser(Swagger2URIParser):
@@ -320,15 +306,15 @@ class FirstValueURIParser(Swagger2URIParser):
 
     @staticmethod
     def _resolve_param_duplicates(values, param_defn, _in):
-        """ Resolve cases where query parameters are provided multiple times.
-            The default behavior is to use the first-defined value.
-            For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
-            `a` would be "1,2,3".
-            However, if 'collectionFormat' is 'multi' then the duplicate values
-            are concatenated together and `a` would be "1,2,3,4,5,6".
+        """Resolve cases where query parameters are provided multiple times.
+        The default behavior is to use the first-defined value.
+        For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
+        `a` would be "1,2,3".
+        However, if 'collectionFormat' is 'multi' then the duplicate values
+        are concatenated together and `a` would be "1,2,3,4,5,6".
         """
-        if param_defn.get('collectionFormat') == 'multi':
-            return ','.join(values)
+        if param_defn.get("collectionFormat") == "multi":
+            return ",".join(values)
         # default to first defined value
         return values[0]
 
@@ -341,11 +327,11 @@ class AlwaysMultiURIParser(Swagger2URIParser):
 
     @staticmethod
     def _resolve_param_duplicates(values, param_defn, _in):
-        """ Resolve cases where query parameters are provided multiple times.
-            The default behavior is to join all provided parameters together.
-            For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
-            `a` would be "1,2,3,4,5,6".
+        """Resolve cases where query parameters are provided multiple times.
+        The default behavior is to join all provided parameters together.
+        For example, if the query string is '?a=1,2,3&a=4,5,6' the value of
+        `a` would be "1,2,3,4,5,6".
         """
-        if param_defn.get('collectionFormat') == 'pipes':
-            return '|'.join(values)
-        return ','.join(values)
+        if param_defn.get("collectionFormat") == "pipes":
+            return "|".join(values)
+        return ",".join(values)
diff --git a/firetail/decorators/validation.py b/firetail/decorators/validation.py
index 1bd8957..3c21553 100644
--- a/firetail/decorators/validation.py
+++ b/firetail/decorators/validation.py
@@ -30,14 +30,9 @@
 
 _jsonschema_3_or_newer = Version(version("jsonschema")) >= Version("3.0.0")
 
-logger = logging.getLogger('firetail.decorators.validation')
+logger = logging.getLogger("firetail.decorators.validation")
 
-TYPE_MAP = {
-    'integer': int,
-    'number': float,
-    'boolean': boolean,
-    'object': dict
-}
+TYPE_MAP = {"integer": int, "number": float, "boolean": boolean, "object": dict}
 
 
 class TypeValidationError(Exception):
@@ -60,7 +55,6 @@ def __str__(self):
 
 
 def coerce_type(param, value, parameter_type, parameter_name=None):
-
     def make_type(value, type_literal):
         type_func = TYPE_MAP.get(type_literal)
         return type_func(value)
@@ -69,12 +63,12 @@ def make_type(value, type_literal):
     if is_nullable(param_schema) and is_null(value):
         return None
 
-    param_type = param_schema.get('type')
-    parameter_name = parameter_name if parameter_name else param.get('name')
+    param_type = param_schema.get("type")
+    parameter_name = parameter_name if parameter_name else param.get("name")
     if param_type == "array":
         converted_params = []
         if parameter_type == "header":
-            value = value.split(',')
+            value = value.split(",")
         for v in value:
             try:
                 converted = make_type(v, param_schema["items"]["type"])
@@ -82,17 +76,18 @@ def make_type(value, type_literal):
                 converted = v
             converted_params.append(converted)
         return converted_params
-    elif param_type == 'object':
-        if param_schema.get('properties'):
+    elif param_type == "object":
+        if param_schema.get("properties"):
+
             def cast_leaves(d, schema):
                 if type(d) is not dict:
                     try:
-                        return make_type(d, schema['type'])
+                        return make_type(d, schema["type"])
                     except (ValueError, TypeError):
                         return d
                 for k, v in d.items():
-                    if k in schema['properties']:
-                        d[k] = cast_leaves(v, schema['properties'][k])
+                    if k in schema["properties"]:
+                        d[k] = cast_leaves(v, schema["properties"][k])
                 return d
 
             return cast_leaves(value, param_schema)
@@ -114,9 +109,7 @@ def validate_parameter_list(request_params, spec_params):
 
 
 class RequestBodyValidator:
-
-    def __init__(self, schema, consumes, api, is_null_value_valid=False, validator=None,
-                 strict_validation=False):
+    def __init__(self, schema, consumes, api, is_null_value_valid=False, validator=None, strict_validation=False):
         """
         :param schema: The schema of the request body
         :param consumes: The list of content types the operation consumes
@@ -128,7 +121,7 @@ def __init__(self, schema, consumes, api, is_null_value_valid=False, validator=N
         """
         self.consumes = consumes
         self.schema = schema
-        self.has_default = schema.get('default', False)
+        self.has_default = schema.get("default", False)
         self.is_null_value_valid = is_null_value_valid
         validatorClass = validator or Draft4RequestValidator
         self.validator = validatorClass(schema, format_checker=draft4_format_checker)
@@ -137,7 +130,7 @@ def __init__(self, schema, consumes, api, is_null_value_valid=False, validator=N
 
     def validate_formdata_parameter_list(self, request):
         request_params = request.form.keys()
-        spec_params = self.schema.get('properties', {}).keys()
+        spec_params = self.schema.get("properties", {}).keys()
         return validate_parameter_list(request_params, spec_params)
 
     def __call__(self, function):
@@ -164,17 +157,18 @@ def wrapper(request):
                     else:
                         # the body has contents that were not parsed as JSON
                         raise UnsupportedMediaTypeProblem(
-                                       detail="Invalid Content-type ({content_type}), expected JSON data".format(
-                                           content_type=request.headers.get("Content-Type", "")
-                                       ))
+                            detail="Invalid Content-type ({content_type}), expected JSON data".format(
+                                content_type=request.headers.get("Content-Type", "")
+                            )
+                        )
 
                 logger.debug("%s validating schema...", request.url)
                 if data is not None or not self.has_default:
                     self.validate_schema(data, request.url)
             elif self.consumes[0] in FORM_CONTENT_TYPES:
                 data = dict(request.form.items()) or (request.body if len(request.body) > 0 else {})
-                data.update(dict.fromkeys(request.files, ''))  # validator expects string..
-                logger.debug('%s validating schema...', request.url)
+                data.update(dict.fromkeys(request.files, ""))  # validator expects string..
+                logger.debug("%s validating schema...", request.url)
 
                 if self.strict_validation:
                     formdata_errors = self.validate_formdata_parameter_list(request)
@@ -187,7 +181,7 @@ def wrapper(request):
                     for k, param_defn in props.items():
                         if k in data:
                             try:
-                                data[k] = coerce_type(param_defn, data[k], 'requestBody', k)
+                                data[k] = coerce_type(param_defn, data[k], "requestBody", k)
                             except TypeValidationError as e:
                                 errs += [str(e)]
                                 print(errs)
@@ -203,7 +197,7 @@ def wrapper(request):
 
     @classmethod
     def _error_path_message(cls, exception):
-        error_path = '.'.join(str(item) for item in exception.path)
+        error_path = ".".join(str(item) for item in exception.path)
         error_path_msg = f" - '{error_path}'" if error_path else ""
         return error_path_msg
 
@@ -218,12 +212,13 @@ def validate_schema(self, data, url):
             error_path_msg = self._error_path_message(exception=exception)
             logger.error(
                 "{url} validation error: {error}{error_path_msg}".format(
-                    url=url, error=exception.message,
-                    error_path_msg=error_path_msg),
-                extra={'validator': 'body'})
-            raise BadRequestProblem(detail="{message}{error_path_msg}".format(
-                               message=exception.message,
-                               error_path_msg=error_path_msg))
+                    url=url, error=exception.message, error_path_msg=error_path_msg
+                ),
+                extra={"validator": "body"},
+            )
+            raise BadRequestProblem(
+                detail="{message}{error_path_msg}".format(message=exception.message, error_path_msg=error_path_msg)
+            )
 
         return None
 
@@ -244,9 +239,9 @@ def validate_schema(self, data, url):
         try:
             self.validator.validate(data)
         except ValidationError as exception:
-            logger.error("{url} validation error: {error}".format(url=url,
-                                                                  error=exception),
-                         extra={'validator': 'response'})
+            logger.error(
+                "{url} validation error: {error}".format(url=url, error=exception), extra={"validator": "response"}
+            )
             raise exception
 
         return None
@@ -261,7 +256,7 @@ def __init__(self, parameters, api, strict_validation=False):
         """
         self.parameters = collections.defaultdict(list)
         for p in parameters:
-            self.parameters[p['in']].append(p)
+            self.parameters[p["in"]].append(p)
 
         self.api = api
         self.strict_validation = strict_validation
@@ -278,51 +273,50 @@ def validate_parameter(parameter_type, value, param, param_name=None):
                 return str(e)
 
             param = copy.deepcopy(param)
-            param = param.get('schema', param)
-            if 'required' in param:
-                del param['required']
+            param = param.get("schema", param)
+            if "required" in param:
+                del param["required"]
             try:
-                if parameter_type == 'formdata' and param.get('type') == 'file':
+                if parameter_type == "formdata" and param.get("type") == "file":
                     if _jsonschema_3_or_newer:
                         extend(
                             Draft4Validator,
                             type_checker=Draft4Validator.TYPE_CHECKER.redefine(
-                                "file",
-                                lambda checker, instance: isinstance(instance, FileStorage)
-                            )
+                                "file", lambda checker, instance: isinstance(instance, FileStorage)
+                            ),
                         )(param, format_checker=draft4_format_checker).validate(converted_value)
                     else:
                         Draft4Validator(
-                            param,
-                            format_checker=draft4_format_checker,
-                            types={'file': FileStorage}).validate(converted_value)
+                            param, format_checker=draft4_format_checker, types={"file": FileStorage}
+                        ).validate(converted_value)
                 else:
-                    Draft4Validator(
-                        param, format_checker=draft4_format_checker).validate(converted_value)
+                    Draft4Validator(param, format_checker=draft4_format_checker).validate(converted_value)
             except ValidationError as exception:
-                debug_msg = 'Error while converting value {converted_value} from param ' \
-                            '{type_converted_value} of type real type {param_type} to the declared type {param}'
+                debug_msg = (
+                    "Error while converting value {converted_value} from param "
+                    "{type_converted_value} of type real type {param_type} to the declared type {param}"
+                )
                 fmt_params = dict(
                     converted_value=str(converted_value),
                     type_converted_value=type(converted_value),
-                    param_type=param.get('type'),
-                    param=param
+                    param_type=param.get("type"),
+                    param=param,
                 )
                 logger.info(debug_msg.format(**fmt_params))
                 return str(exception)
 
-        elif param.get('required'):
+        elif param.get("required"):
             return "Missing {parameter_type} parameter '{param[name]}'".format(**locals())
 
     def validate_query_parameter_list(self, request):
         request_params = request.query.keys()
-        spec_params = [x['name'] for x in self.parameters.get('query', [])]
+        spec_params = [x["name"] for x in self.parameters.get("query", [])]
         return validate_parameter_list(request_params, spec_params)
 
     def validate_formdata_parameter_list(self, request):
         request_params = request.form.keys()
-        if 'formData' in self.parameters:  # Swagger 2:
-            spec_params = [x['name'] for x in self.parameters['formData']]
+        if "formData" in self.parameters:  # Swagger 2:
+            spec_params = [x["name"] for x in self.parameters["formData"]]
         else:  # OAS 3
             return set()
         return validate_parameter_list(request_params, spec_params)
@@ -334,28 +328,28 @@ def validate_query_parameter(self, param, request):
         :type param: dict
         :rtype: str
         """
-        val = request.query.get(param['name'])
-        return self.validate_parameter('query', val, param)
+        val = request.query.get(param["name"])
+        return self.validate_parameter("query", val, param)
 
     def validate_path_parameter(self, param, request):
-        val = request.path_params.get(param['name'].replace('-', '_'))
-        return self.validate_parameter('path', val, param)
+        val = request.path_params.get(param["name"].replace("-", "_"))
+        return self.validate_parameter("path", val, param)
 
     def validate_header_parameter(self, param, request):
-        val = request.headers.get(param['name'])
-        return self.validate_parameter('header', val, param)
+        val = request.headers.get(param["name"])
+        return self.validate_parameter("header", val, param)
 
     def validate_cookie_parameter(self, param, request):
-        val = request.cookies.get(param['name'])
-        return self.validate_parameter('cookie', val, param)
+        val = request.cookies.get(param["name"])
+        return self.validate_parameter("cookie", val, param)
 
     def validate_formdata_parameter(self, param_name, param, request):
-        if param.get('type') == 'file' or param.get('format') == 'binary':
+        if param.get("type") == "file" or param.get("format") == "binary":
             val = request.files.get(param_name)
         else:
             val = request.form.get(param_name)
 
-        return self.validate_parameter('formdata', val, param)
+        return self.validate_parameter("formdata", val, param)
 
     def __call__(self, function):
         """
@@ -374,27 +368,27 @@ def wrapper(request):
                 if formdata_errors or query_errors:
                     raise ExtraParameterProblem(formdata_errors, query_errors)
 
-            for param in self.parameters.get('query', []):
+            for param in self.parameters.get("query", []):
                 error = self.validate_query_parameter(param, request)
                 if error:
                     raise BadRequestProblem(detail=error)
 
-            for param in self.parameters.get('path', []):
+            for param in self.parameters.get("path", []):
                 error = self.validate_path_parameter(param, request)
                 if error:
                     raise BadRequestProblem(detail=error)
 
-            for param in self.parameters.get('header', []):
+            for param in self.parameters.get("header", []):
                 error = self.validate_header_parameter(param, request)
                 if error:
                     raise BadRequestProblem(detail=error)
 
-            for param in self.parameters.get('cookie', []):
+            for param in self.parameters.get("cookie", []):
                 error = self.validate_cookie_parameter(param, request)
                 if error:
                     raise BadRequestProblem(detail=error)
 
-            for param in self.parameters.get('formData', []):
+            for param in self.parameters.get("formData", []):
                 error = self.validate_formdata_parameter(param["name"], param, request)
                 if error:
                     raise BadRequestProblem(detail=error)
diff --git a/firetail/exceptions.py b/firetail/exceptions.py
index 76758ba..79ee509 100644
--- a/firetail/exceptions.py
+++ b/firetail/exceptions.py
@@ -15,8 +15,7 @@ class FiretailException(Exception):
 
 
 class ProblemException(FiretailException):
-    def __init__(self, status=400, title=None, detail=None, type=None,
-                 instance=None, headers=None, ext=None):
+    def __init__(self, status=400, title=None, detail=None, type=None, instance=None, headers=None, ext=None):
         """
         This exception holds arguments that are going to be passed to the
         `firetail.problem` function to generate a proper response.
@@ -32,14 +31,22 @@ def __init__(self, status=400, title=None, detail=None, type=None,
     def to_problem(self):
         warnings.warn(
             "'to_problem' is planned to be removed in a future release. "
-            "Call firetail.problem.problem(..) instead to maintain the existing error response.", DeprecationWarning)
-        return problem(status=self.status, title=self.title, detail=self.detail,
-                       type=self.type, instance=self.instance, headers=self.headers,
-                       ext=self.ext)
+            "Call firetail.problem.problem(..) instead to maintain the existing error response.",
+            DeprecationWarning,
+        )
+        return problem(
+            status=self.status,
+            title=self.title,
+            detail=self.detail,
+            type=self.type,
+            instance=self.instance,
+            headers=self.headers,
+            ext=self.ext,
+        )
 
 
 class ResolverError(LookupError):
-    def __init__(self, reason='Unknown reason', exc_info=None):
+    def __init__(self, reason="Unknown reason", exc_info=None):
         """
         :param reason: Reason why the resolver failed.
         :type reason: str
@@ -51,10 +58,10 @@ def __init__(self, reason='Unknown reason', exc_info=None):
         self.exc_info = exc_info
 
     def __str__(self):  # pragma: no cover
-        return f'<ResolverError: {self.reason}>'
+        return f"<ResolverError: {self.reason}>"
 
     def __repr__(self):  # pragma: no cover
-        return f'<ResolverError: {self.reason}>'
+        return f"<ResolverError: {self.reason}>"
 
 
 class InvalidSpecification(FiretailException, ValidationError):
@@ -62,7 +69,7 @@ class InvalidSpecification(FiretailException, ValidationError):
 
 
 class NonConformingResponse(ProblemException):
-    def __init__(self, reason='Unknown Reason', message=None):
+    def __init__(self, reason="Unknown Reason", message=None):
         """
         :param reason: Reason why the response did not conform to the specification
         :type reason: str
@@ -72,32 +79,28 @@ def __init__(self, reason='Unknown Reason', message=None):
         self.message = message
 
     def __str__(self):  # pragma: no cover
-        return f'<NonConformingResponse: {self.reason}>'
+        return f"<NonConformingResponse: {self.reason}>"
 
     def __repr__(self):  # pragma: no cover
-        return f'<NonConformingResponse: {self.reason}>'
+        return f"<NonConformingResponse: {self.reason}>"
 
 
 class AuthenticationProblem(ProblemException):
-
     def __init__(self, status, title, detail):
         super().__init__(status=status, title=title, detail=detail)
 
 
 class ResolverProblem(ProblemException):
-
     def __init__(self, status, title, detail):
         super().__init__(status=status, title=title, detail=detail)
 
 
 class BadRequestProblem(ProblemException):
-
-    def __init__(self, title='Bad Request', detail=None):
+    def __init__(self, title="Bad Request", detail=None):
         super().__init__(status=400, title=title, detail=detail)
 
 
 class UnsupportedMediaTypeProblem(ProblemException):
-
     def __init__(self, title="Unsupported Media Type", detail=None):
         super().__init__(status=415, title=title, detail=detail)
 
@@ -138,10 +141,12 @@ def __init__(self, formdata_parameters, query_parameters, title=None, detail=Non
         # This keep backwards compatibility with the old returns
         if detail is None:
             if self.extra_query:
-                detail = "Extra {parameter_type} parameter(s) {extra_params} not in spec"\
-                    .format(parameter_type='query', extra_params=', '.join(self.extra_query))
+                detail = "Extra {parameter_type} parameter(s) {extra_params} not in spec".format(
+                    parameter_type="query", extra_params=", ".join(self.extra_query)
+                )
             elif self.extra_formdata:
-                detail = "Extra {parameter_type} parameter(s) {extra_params} not in spec"\
-                    .format(parameter_type='formData', extra_params=', '.join(self.extra_formdata))
+                detail = "Extra {parameter_type} parameter(s) {extra_params} not in spec".format(
+                    parameter_type="formData", extra_params=", ".join(self.extra_formdata)
+                )
 
         super().__init__(title=title, detail=detail, **kwargs)
diff --git a/firetail/flusher.py b/firetail/flusher.py
index 8e56ed8..30f23a6 100644
--- a/firetail/flusher.py
+++ b/firetail/flusher.py
@@ -3,7 +3,6 @@
 
 
 class FiretailFlusher(logging.Logger):
-
     def __init__(self, logger):
         self.logger = logger
 
@@ -13,8 +12,9 @@ def wrapper(*args, **kwargs):
             try:
                 return function(*args, **kwargs)
             except Exception as e:
-                self.logger.exception('call failed: {}'.format(e))
+                self.logger.exception("call failed: {}".format(e))
                 raise
             finally:
                 [h.flush() for h in self.logger.root.handlers]
+
         return wrapper
diff --git a/firetail/handlers.py b/firetail/handlers.py
index 7d7d486..505ddcd 100644
--- a/firetail/handlers.py
+++ b/firetail/handlers.py
@@ -12,7 +12,7 @@
 from .operations.secure import SecureOperation
 from .sender import FiretailSender
 
-logger = logging.getLogger('firetail.handlers')
+logger = logging.getLogger("firetail.handlers")
 
 RESOLVER_ERROR_ENDPOINT_RANDOM_DIGITS = 6
 
@@ -44,7 +44,7 @@ def function(self):
         Configured error auth handler.
         """
         security_decorator = self.security_decorator
-        logger.debug('... Adding security decorator (%r)', security_decorator, extra=vars(self))
+        logger.debug("... Adding security decorator (%r)", security_decorator, extra=vars(self))
         function = self.handle
         function = security_decorator(function)
         function = self._request_response_decorator(function)
@@ -55,9 +55,7 @@ def handle(self, *args, **kwargs):
         Actual handler for the execution after authentication.
         """
         raise AuthenticationProblem(
-            title=self.exception.name,
-            detail=self.exception.description,
-            status=self.exception.code
+            title=self.exception.name, detail=self.exception.description, status=self.exception.code
         )
 
 
@@ -76,11 +74,7 @@ def function(self):
         return self.handle
 
     def handle(self, *args, **kwargs):
-        raise ResolverProblem(
-            title='Not Implemented',
-            detail=self.exception.reason,
-            status=self.status_code
-        )
+        raise ResolverProblem(title="Not Implemented", detail=self.exception.reason, status=self.status_code)
 
     @property
     def operation_id(self):
@@ -108,7 +102,6 @@ def __init__(
         retries_no=4,
         retry_timeout=2,
     ):
-
         if not token and not custom_backend:
             raise FiretailException("firetail Token must be provided")
 
@@ -130,7 +123,6 @@ def __del__(self):
         del self.firetail_sender
 
     def extra_fields(self, message):
-
         not_allowed_keys = (
             "args",
             "asctime",
diff --git a/firetail/http_facts.py b/firetail/http_facts.py
index f2c8c46..21c9c7f 100644
--- a/firetail/http_facts.py
+++ b/firetail/http_facts.py
@@ -2,18 +2,6 @@
 This module contains definitions of the HTTP protocol.
 """
 
-FORM_CONTENT_TYPES = [
-    'application/x-www-form-urlencoded',
-    'multipart/form-data'
-]
+FORM_CONTENT_TYPES = ["application/x-www-form-urlencoded", "multipart/form-data"]
 
-METHODS = {
-    "get",
-    "put",
-    "post",
-    "delete",
-    "options",
-    "head",
-    "patch",
-    "trace"
-}
+METHODS = {"get", "put", "post", "delete", "options", "head", "patch", "trace"}
diff --git a/firetail/json_schema.py b/firetail/json_schema.py
index ec18323..f8e02cb 100644
--- a/firetail/json_schema.py
+++ b/firetail/json_schema.py
@@ -45,9 +45,7 @@ def __call__(self, uri):
     def _uri_to_path(uri):
         parsed = urllib.parse.urlparse(uri)
         host = "{0}{0}{mnt}{0}".format(os.path.sep, mnt=parsed.netloc)
-        return os.path.abspath(
-            os.path.join(host, urllib.request.url2pathname(parsed.path))
-        )
+        return os.path.abspath(os.path.join(host, urllib.request.url2pathname(parsed.path)))
 
 
 class URLHandler:
@@ -63,9 +61,9 @@ def __call__(self, uri):
 
 
 default_handlers = {
-    'http': URLHandler(),
-    'https': URLHandler(),
-    'file': FileHandler(),
+    "http": URLHandler(),
+    "https": URLHandler(),
+    "file": FileHandler(),
 }
 
 
@@ -78,19 +76,19 @@ def resolve_refs(spec, store=None, handlers=None):
     spec = deepcopy(spec)
     store = store or {}
     handlers = handlers or default_handlers
-    resolver = RefResolver('', spec, store, handlers=handlers)
+    resolver = RefResolver("", spec, store, handlers=handlers)
 
     def _do_resolve(node):
-        if isinstance(node, Mapping) and '$ref' in node:
-            path = node['$ref'][2:].split("/")
+        if isinstance(node, Mapping) and "$ref" in node:
+            path = node["$ref"][2:].split("/")
             try:
                 # resolve known references
                 node.update(deep_get(spec, path))
-                del node['$ref']
+                del node["$ref"]
                 return node
             except KeyError:
                 # resolve external references
-                with resolver.resolving(node['$ref']) as resolved:
+                with resolver.resolving(node["$ref"]) as resolved:
                     return resolved
         elif isinstance(node, Mapping):
             for k, v in node.items():
@@ -108,7 +106,7 @@ def allow_nullable(validation_fn: t.Callable) -> t.Callable:
     """Extend an existing validation function, so it allows nullable values to be null."""
 
     def nullable_validation_fn(validator, to_validate, instance, schema):
-        if instance is None and (schema.get('x-nullable') is True or schema.get('nullable')):
+        if instance is None and (schema.get("x-nullable") is True or schema.get("nullable")):
             return
 
         yield from validation_fn(validator, to_validate, instance, schema)
@@ -122,15 +120,15 @@ def validate_required(validator, required, instance, schema):
 
     for prop in required:
         if prop not in instance:
-            properties = schema.get('properties')
+            properties = schema.get("properties")
             if properties is not None:
                 subschema = properties.get(prop)
                 if subschema is not None:
-                    if 'readOnly' in validator.VALIDATORS and subschema.get('readOnly'):
+                    if "readOnly" in validator.VALIDATORS and subschema.get("readOnly"):
                         continue
-                    if 'writeOnly' in validator.VALIDATORS and subschema.get('writeOnly'):
+                    if "writeOnly" in validator.VALIDATORS and subschema.get("writeOnly"):
                         continue
-                    if 'x-writeOnly' in validator.VALIDATORS and subschema.get('x-writeOnly') is True:
+                    if "x-writeOnly" in validator.VALIDATORS and subschema.get("x-writeOnly") is True:
                         continue
             yield ValidationError("%r is a required property" % prop)
 
@@ -143,18 +141,26 @@ def validate_writeOnly(validator, wo, instance, schema):
     yield ValidationError("Property is write-only")
 
 
-NullableTypeValidator = allow_nullable(Draft4Validator.VALIDATORS['type'])
-NullableEnumValidator = allow_nullable(Draft4Validator.VALIDATORS['enum'])
-
-Draft4RequestValidator = extend(Draft4Validator, {
-                                'type': NullableTypeValidator,
-                                'enum': NullableEnumValidator,
-                                'required': validate_required,
-                                'readOnly': validate_readOnly})
-
-Draft4ResponseValidator = extend(Draft4Validator, {
-                                 'type': NullableTypeValidator,
-                                 'enum': NullableEnumValidator,
-                                 'required': validate_required,
-                                 'writeOnly': validate_writeOnly,
-                                 'x-writeOnly': validate_writeOnly})
+NullableTypeValidator = allow_nullable(Draft4Validator.VALIDATORS["type"])
+NullableEnumValidator = allow_nullable(Draft4Validator.VALIDATORS["enum"])
+
+Draft4RequestValidator = extend(
+    Draft4Validator,
+    {
+        "type": NullableTypeValidator,
+        "enum": NullableEnumValidator,
+        "required": validate_required,
+        "readOnly": validate_readOnly,
+    },
+)
+
+Draft4ResponseValidator = extend(
+    Draft4Validator,
+    {
+        "type": NullableTypeValidator,
+        "enum": NullableEnumValidator,
+        "required": validate_required,
+        "writeOnly": validate_writeOnly,
+        "x-writeOnly": validate_writeOnly,
+    },
+)
diff --git a/firetail/jsonifier.py b/firetail/jsonifier.py
index aef130a..ceffbe5 100644
--- a/firetail/jsonifier.py
+++ b/firetail/jsonifier.py
@@ -21,11 +21,11 @@ def default(self, o):
         if isinstance(o, datetime.datetime):
             if o.tzinfo:
                 # eg: '2015-09-25T23:14:42.588601+00:00'
-                return o.isoformat('T')
+                return o.isoformat("T")
             else:
                 # No timezone present - assume UTC.
                 # eg: '2015-09-25T23:14:42.588601Z'
-                return o.isoformat('T') + 'Z'
+                return o.isoformat("T") + "Z"
 
         if isinstance(o, datetime.date):
             return o.isoformat()
@@ -40,6 +40,7 @@ class Jsonifier:
     """
     Central point to serialize and deserialize to/from JSon in Firetail.
     """
+
     def __init__(self, json_=json, **kwargs):
         """
         :param json_: json library to use. Must have loads() and dumps() method  # NOQA
@@ -49,15 +50,15 @@ def __init__(self, json_=json, **kwargs):
         self.dumps_args = kwargs
 
     def dumps(self, data, **kwargs):
-        """ Central point where JSON serialization happens inside
+        """Central point where JSON serialization happens inside
         Firetail.
         """
         for k, v in self.dumps_args.items():
             kwargs.setdefault(k, v)
-        return self.json.dumps(data, **kwargs) + '\n'
+        return self.json.dumps(data, **kwargs) + "\n"
 
     def loads(self, data):
-        """ Central point where JSON deserialization happens inside
+        """Central point where JSON deserialization happens inside
         Firetail.
         """
         if isinstance(data, bytes):
diff --git a/firetail/lifecycle.py b/firetail/lifecycle.py
index 47dba4f..9128b2a 100644
--- a/firetail/lifecycle.py
+++ b/firetail/lifecycle.py
@@ -6,18 +6,21 @@
 
 class FiretailRequest:
     """Firetail interface for a request."""
-    def __init__(self,
-                 url,
-                 method,
-                 path_params=None,
-                 query=None,
-                 headers=None,
-                 form=None,
-                 body=None,
-                 json_getter=None,
-                 files=None,
-                 context=None,
-                 cookies=None):
+
+    def __init__(
+        self,
+        url,
+        method,
+        path_params=None,
+        query=None,
+        headers=None,
+        form=None,
+        body=None,
+        json_getter=None,
+        files=None,
+        context=None,
+        cookies=None,
+    ):
         self.url = url
         self.method = method
         self.path_params = path_params or {}
@@ -32,20 +35,15 @@ def __init__(self,
 
     @property
     def json(self):
-        if not hasattr(self, '_json'):
+        if not hasattr(self, "_json"):
             self._json = self.json_getter()
         return self._json
 
 
 class FiretailResponse:
     """Firetail interface for a response."""
-    def __init__(self,
-                 status_code=200,
-                 mimetype=None,
-                 content_type=None,
-                 body=None,
-                 headers=None,
-                 is_streamed=False):
+
+    def __init__(self, status_code=200, mimetype=None, content_type=None, body=None, headers=None, is_streamed=False):
         self.status_code = status_code
         self.mimetype = mimetype
         self.content_type = content_type
diff --git a/firetail/logger.py b/firetail/logger.py
index fcbdac8..347b343 100644
--- a/firetail/logger.py
+++ b/firetail/logger.py
@@ -7,8 +7,7 @@ def get_logger(debug):
 
 
 def get_stdout_logger(debug):
-    stdout_logger = __get_logger(
-        debug, __name__ + '_stdout', logging.StreamHandler(sys.stdout))
+    stdout_logger = __get_logger(debug, __name__ + "_stdout", logging.StreamHandler(sys.stdout))
     stdout_logger.propagate = False
     return stdout_logger
 
diff --git a/firetail/middleware/base.py b/firetail/middleware/base.py
index ed09acd..32db957 100644
--- a/firetail/middleware/base.py
+++ b/firetail/middleware/base.py
@@ -4,7 +4,6 @@
 
 
 class AppMiddleware(abc.ABC):
-
     @abc.abstractmethod
     def add_api(self, specification: t.Union[pathlib.Path, str, dict], **kwargs) -> None:
         pass
diff --git a/firetail/middleware/main.py b/firetail/middleware/main.py
index 5ea8844..4d5d79f 100644
--- a/firetail/middleware/main.py
+++ b/firetail/middleware/main.py
@@ -9,17 +9,12 @@
 
 
 class FiretailMiddleware:
-
     default_middlewares = [
         ExceptionMiddleware,
         SwaggerUIMiddleware,
     ]
 
-    def __init__(
-            self,
-            app: ASGIApp,
-            middlewares: t.Optional[t.List[t.Type[ASGIApp]]] = None
-    ):
+    def __init__(self, app: ASGIApp, middlewares: t.Optional[t.List[t.Type[ASGIApp]]] = None):
         """High level Firetail middleware that manages a list o middlewares wrapped around an
         application.
 
@@ -32,8 +27,7 @@ def __init__(
         self.app, self.apps = self._apply_middlewares(app, middlewares)
 
     @staticmethod
-    def _apply_middlewares(app: ASGIApp, middlewares: t.List[t.Type[ASGIApp]]) \
-            -> t.Tuple[ASGIApp, t.Iterable[ASGIApp]]:
+    def _apply_middlewares(app: ASGIApp, middlewares: t.List[t.Type[ASGIApp]]) -> t.Tuple[ASGIApp, t.Iterable[ASGIApp]]:
         """Apply all middlewares to the provided app.
 
         :param app: App to wrap in middlewares.
@@ -49,11 +43,11 @@ def _apply_middlewares(app: ASGIApp, middlewares: t.List[t.Type[ASGIApp]]) \
         return app, reversed(apps)
 
     def add_api(
-            self,
-            specification: t.Union[pathlib.Path, str, dict],
-            base_path: t.Optional[str] = None,
-            arguments: t.Optional[dict] = None,
-            **kwargs
+        self,
+        specification: t.Union[pathlib.Path, str, dict],
+        base_path: t.Optional[str] = None,
+        arguments: t.Optional[dict] = None,
+        **kwargs
     ) -> None:
         """Add an API to the underlying routing middleware based on a OpenAPI spec.
 
@@ -63,8 +57,7 @@ def add_api(
         """
         for app in self.apps:
             if isinstance(app, AppMiddleware):
-                app.add_api(specification, base_path=base_path,
-                            arguments=arguments, **kwargs)
+                app.add_api(specification, base_path=base_path, arguments=arguments, **kwargs)
 
     async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
         await self.app(scope, receive, send)
diff --git a/firetail/middleware/swagger_ui.py b/firetail/middleware/swagger_ui.py
index 3867539..88e78a6 100644
--- a/firetail/middleware/swagger_ui.py
+++ b/firetail/middleware/swagger_ui.py
@@ -17,14 +17,13 @@
 
 from .base import AppMiddleware
 
-logger = logging.getLogger('firetail.middleware.swagger_ui')
+logger = logging.getLogger("firetail.middleware.swagger_ui")
 
 
-_original_scope: ContextVar[Scope] = ContextVar('SCOPE')
+_original_scope: ContextVar[Scope] = ContextVar("SCOPE")
 
 
 class SwaggerUIMiddleware(AppMiddleware):
-
     def __init__(self, app: ASGIApp) -> None:
         """Middleware that hosts a swagger UI.
 
@@ -35,11 +34,11 @@ def __init__(self, app: ASGIApp) -> None:
         self.router = Router(default=self.default_fn)
 
     def add_api(
-            self,
-            specification: t.Union[pathlib.Path, str, dict],
-            base_path: t.Optional[str] = None,
-            arguments: t.Optional[dict] = None,
-            **kwargs
+        self,
+        specification: t.Union[pathlib.Path, str, dict],
+        base_path: t.Optional[str] = None,
+        arguments: t.Optional[dict] = None,
+        **kwargs
     ) -> None:
         """Add an API to the router based on a OpenAPI spec.
 
@@ -47,8 +46,7 @@ def add_api(
         :param base_path: Base path where to add this API.
         :param arguments: Jinja arguments to replace in the spec.
         """
-        api = SwaggerUIAPI(specification, base_path=base_path, arguments=arguments,
-                           default=self.default_fn, **kwargs)
+        api = SwaggerUIAPI(specification, base_path=base_path, arguments=arguments, default=self.default_fn, **kwargs)
         self.router.mount(api.base_path, app=api.router)
 
     async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
@@ -70,15 +68,12 @@ async def default_fn(self, _scope: Scope, receive: Receive, send: Send) -> None:
 
 
 class SwaggerUIAPI(AbstractSwaggerUIAPI):
-
     def __init__(self, *args, default: ASGIApp, **kwargs):
         self.router = Router(default=default)
 
         super().__init__(*args, **kwargs)
 
-        self._templates = Jinja2Templates(
-            directory=str(self.options.openapi_console_ui_from_dir)
-        )
+        self._templates = Jinja2Templates(directory=str(self.options.openapi_console_ui_from_dir))
 
     @staticmethod
     def normalize_string(string):
@@ -156,12 +151,10 @@ def add_swagger_ui(self):
         logger.debug("Adding swagger-ui: %s%s/", self.base_path, console_ui_path)
 
         for path in (
-                console_ui_path + "/",
-                console_ui_path + "/index.html",
+            console_ui_path + "/",
+            console_ui_path + "/index.html",
         ):
-            self.router.add_route(
-                methods=["GET"], path=path, endpoint=self._get_swagger_ui_home
-            )
+            self.router.add_route(methods=["GET"], path=path, endpoint=self._get_swagger_ui_home)
 
         if self.options.openapi_console_ui_config is not None:
             self.router.add_route(
diff --git a/firetail/mock.py b/firetail/mock.py
index d8dca6c..05cfa85 100644
--- a/firetail/mock.py
+++ b/firetail/mock.py
@@ -11,7 +11,6 @@
 
 
 class MockResolver(Resolver):
-
     def __init__(self, mock_all):
         super().__init__()
         self.mock_all = mock_all
@@ -26,7 +25,7 @@ def resolve(self, operation):
         operation_id = self.resolve_operation_id(operation)
         if not operation_id:
             # just generate an unique operation ID
-            operation_id = f'mock-{self._operation_id_counter}'
+            operation_id = f"mock-{self._operation_id_counter}"
             self._operation_id_counter += 1
 
         mock_func = functools.partial(self.mock_operation, operation=operation)
@@ -36,11 +35,13 @@ def resolve(self, operation):
             try:
                 func = self.resolve_function_from_operation_id(operation_id)
                 msg = "... Successfully resolved operationId '{}'! Mock is *not* used for this operation.".format(
-                    operation_id)
+                    operation_id
+                )
                 logger.debug(msg)
             except ResolverError as resolution_error:
-                logger.debug('... {}! Mock function is used for this operation.'.format(
-                    resolution_error.reason.capitalize()))
+                logger.debug(
+                    "... {}! Mock function is used for this operation.".format(resolution_error.reason.capitalize())
+                )
                 func = mock_func
         return Resolution(func, operation_id)
 
@@ -48,4 +49,4 @@ def mock_operation(self, operation, *args, **kwargs):
         resp, code = operation.example_response()
         if resp is not None:
             return resp, code
-        return 'No example response was defined.', code
+        return "No example response was defined.", code
diff --git a/firetail/operations/abstract.py b/firetail/operations/abstract.py
index 975bacb..50c9efa 100644
--- a/firetail/operations/abstract.py
+++ b/firetail/operations/abstract.py
@@ -15,14 +15,14 @@
 from ..decorators.validation import ParameterValidator, RequestBodyValidator
 from ..utils import all_json, is_nullable
 
-logger = logging.getLogger('firetail.operations.abstract')
+logger = logging.getLogger("firetail.operations.abstract")
 
-DEFAULT_MIMETYPE = 'application/json'
+DEFAULT_MIMETYPE = "application/json"
 
 VALIDATOR_MAP = {
-    'parameter': ParameterValidator,
-    'body': RequestBodyValidator,
-    'response': ResponseValidator,
+    "parameter": ParameterValidator,
+    "body": RequestBodyValidator,
+    "response": ResponseValidator,
 }
 
 
@@ -44,12 +44,24 @@ def user_provided_handler_function(important, stuff):
             if important:
                 serious_business(stuff)
     """
-    def __init__(self, api, method, path, operation, resolver,
-                 app_security=None, security_schemes=None,
-                 validate_responses=False, strict_validation=False,
-                 randomize_endpoint=None, validator_map=None,
-                 pythonic_params=False, uri_parser_class=None,
-                 pass_context_arg_name=None):
+
+    def __init__(
+        self,
+        api,
+        method,
+        path,
+        operation,
+        resolver,
+        app_security=None,
+        security_schemes=None,
+        validate_responses=False,
+        strict_validation=False,
+        randomize_endpoint=None,
+        validator_map=None,
+        pythonic_params=False,
+        uri_parser_class=None,
+        pass_context_arg_name=None,
+    ):
         """
         :param api: api that this operation is attached to
         :type api: apis.AbstractAPI
@@ -187,24 +199,22 @@ def _get_val_from_param(self, value, query_defn):
         Convert input parameters into the correct type
         """
 
-    def _query_args_helper(self, query_defns, query_arguments,
-                           function_arguments, has_kwargs, sanitize):
+    def _query_args_helper(self, query_defns, query_arguments, function_arguments, has_kwargs, sanitize):
         res = {}
         for key, value in query_arguments.items():
             sanitized_key = sanitize(key)
             if not has_kwargs and sanitized_key not in function_arguments:
-                logger.debug("Query Parameter '%s' (sanitized: '%s') not in function arguments",
-                             key, sanitized_key)
+                logger.debug("Query Parameter '%s' (sanitized: '%s') not in function arguments", key, sanitized_key)
             else:
-                logger.debug("Query Parameter '%s' (sanitized: '%s') in function arguments",
-                             key, sanitized_key)
+                logger.debug("Query Parameter '%s' (sanitized: '%s') in function arguments", key, sanitized_key)
                 try:
                     query_defn = query_defns[key]
                 except KeyError:  # pragma: no cover
-                    logger.error("Function argument '%s' (non-sanitized: %s) not defined in specification",
-                                 sanitized_key, key)
+                    logger.error(
+                        "Function argument '%s' (non-sanitized: %s) not defined in specification", sanitized_key, key
+                    )
                 else:
-                    logger.debug('%s is a %s', key, query_defn)
+                    logger.debug("%s is a %s", key, query_defn)
                     res.update({sanitized_key: self._get_val_from_param(value, query_defn)})
         return res
 
@@ -270,32 +280,25 @@ def body_definition(self):
         :rtype: dict
         """
 
-    def get_arguments(self, path_params, query_params, body, files, arguments,
-                      has_kwargs, sanitize):
+    def get_arguments(self, path_params, query_params, body, files, arguments, has_kwargs, sanitize):
         """
         get arguments for handler function
         """
         ret = {}
         ret.update(self._get_path_arguments(path_params, sanitize))
-        ret.update(self._get_query_arguments(query_params, arguments,
-                                             has_kwargs, sanitize))
+        ret.update(self._get_query_arguments(query_params, arguments, has_kwargs, sanitize))
 
         if self.method.upper() in ["PATCH", "POST", "PUT"]:
-            ret.update(self._get_body_argument(body, arguments,
-                                               has_kwargs, sanitize))
+            ret.update(self._get_body_argument(body, arguments, has_kwargs, sanitize))
             ret.update(self._get_file_arguments(files, arguments, has_kwargs))
         return ret
 
-    def response_definition(self, status_code=None,
-                            content_type=None):
+    def response_definition(self, status_code=None, content_type=None):
         """
         response definition for this endpoint
         """
         content_type = content_type or self.get_mimetype()
-        response_definition = self.responses.get(
-            str(status_code),
-            self.responses.get("default", {})
-        )
+        response_definition = self.responses.get(str(status_code), self.responses.get("default", {}))
         return response_definition
 
     @abc.abstractmethod
@@ -356,19 +359,16 @@ def function(self):
 
         :rtype: types.FunctionType
         """
-        function = parameter_to_arg(
-            self, self._resolution.function, self.pythonic_params,
-            self._pass_context_arg_name
-        )
+        function = parameter_to_arg(self, self._resolution.function, self.pythonic_params, self._pass_context_arg_name)
 
         if self.validate_responses:
-            logger.debug('... Response validation enabled.')
+            logger.debug("... Response validation enabled.")
             response_decorator = self.__response_validation_decorator
-            logger.debug('... Adding response decorator (%r)', response_decorator)
+            logger.debug("... Adding response decorator (%r)", response_decorator)
             function = response_decorator(function)
 
         produces_decorator = self.__content_type_decorator
-        logger.debug('... Adding produces decorator (%r)', produces_decorator)
+        logger.debug("... Adding produces decorator (%r)", produces_decorator)
         function = produces_decorator(function)
 
         for validation_decorator in self.__validation_decorators:
@@ -379,7 +379,7 @@ def function(self):
 
         # NOTE: the security decorator should be applied last to check auth before anything else :-)
         security_decorator = self.security_decorator
-        logger.debug('... Adding security decorator (%r)', security_decorator)
+        logger.debug("... Adding security decorator (%r)", security_decorator)
         function = security_decorator(function)
 
         function = self._request_response_decorator(function)
@@ -407,16 +407,16 @@ def __content_type_decorator(self):
         :rtype: types.FunctionType
         """
 
-        logger.debug('... Produces: %s', self.produces, extra=vars(self))
+        logger.debug("... Produces: %s", self.produces, extra=vars(self))
 
         mimetype = self.get_mimetype()
         if all_json(self.produces):  # endpoint will return json
-            logger.debug('... Produces json', extra=vars(self))
+            logger.debug("... Produces json", extra=vars(self))
             # TODO: Refactor this.
             return lambda f: f
 
         elif len(self.produces) == 1:
-            logger.debug('... Produces %s', mimetype, extra=vars(self))
+            logger.debug("... Produces %s", mimetype, extra=vars(self))
             decorator = Produces(mimetype)
             return decorator
 
@@ -428,16 +428,18 @@ def __validation_decorators(self):
         """
         :rtype: types.FunctionType
         """
-        ParameterValidator = self.validator_map['parameter']
-        RequestBodyValidator = self.validator_map['body']
+        ParameterValidator = self.validator_map["parameter"]
+        RequestBodyValidator = self.validator_map["body"]
         if self.parameters:
-            yield ParameterValidator(self.parameters,
-                                     self.api,
-                                     strict_validation=self.strict_validation)
+            yield ParameterValidator(self.parameters, self.api, strict_validation=self.strict_validation)
         if self.body_schema:
-            yield RequestBodyValidator(self.body_schema, self.consumes, self.api,
-                                       is_nullable(self.body_definition),
-                                       strict_validation=self.strict_validation)
+            yield RequestBodyValidator(
+                self.body_schema,
+                self.consumes,
+                self.api,
+                is_nullable(self.body_definition),
+                strict_validation=self.strict_validation,
+            )
 
     @property
     def __response_validation_decorator(self):
@@ -445,7 +447,7 @@ def __response_validation_decorator(self):
         Get a decorator for validating the generated Response.
         :rtype: types.FunctionType
         """
-        ResponseValidator = self.validator_map['response']
+        ResponseValidator = self.validator_map["response"]
         return ResponseValidator(self, self.get_mimetype())
 
     def json_loads(self, data):
diff --git a/firetail/operations/openapi.py b/firetail/operations/openapi.py
index e2bddf7..a6cebeb 100644
--- a/firetail/operations/openapi.py
+++ b/firetail/operations/openapi.py
@@ -21,10 +21,24 @@ class OpenAPIOperation(AbstractOperation):
     A single API operation on a path.
     """
 
-    def __init__(self, api, method, path, operation, resolver, path_parameters=None,
-                 app_security=None, components=None, validate_responses=False,
-                 strict_validation=False, randomize_endpoint=None, validator_map=None,
-                 pythonic_params=False, uri_parser_class=None, pass_context_arg_name=None):
+    def __init__(
+        self,
+        api,
+        method,
+        path,
+        operation,
+        resolver,
+        path_parameters=None,
+        app_security=None,
+        components=None,
+        validate_responses=False,
+        strict_validation=False,
+        randomize_endpoint=None,
+        validator_map=None,
+        pythonic_params=False,
+        uri_parser_class=None,
+        pass_context_arg_name=None,
+    ):
         """
         This class uses the OperationID identify the module and function that will handle the operation
 
@@ -72,11 +86,11 @@ def component_get(oas3_name):
             return self.components.get(oas3_name, {})
 
         # operation overrides globals
-        security_schemes = component_get('securitySchemes')
-        app_security = operation.get('security', app_security)
+        security_schemes = component_get("securitySchemes")
+        app_security = operation.get("security", app_security)
         uri_parser_class = uri_parser_class or OpenAPIURIParser
 
-        self._router_controller = operation.get('x-openapi-router-controller')
+        self._router_controller = operation.get("x-openapi-router-controller")
 
         super().__init__(
             api=api,
@@ -92,42 +106,42 @@ def component_get(oas3_name):
             validator_map=validator_map,
             pythonic_params=pythonic_params,
             uri_parser_class=uri_parser_class,
-            pass_context_arg_name=pass_context_arg_name
+            pass_context_arg_name=pass_context_arg_name,
         )
 
         self._definitions_map = {
-            'components': {
-                'schemas': component_get('schemas'),
-                'examples': component_get('examples'),
-                'requestBodies': component_get('requestBodies'),
-                'parameters': component_get('parameters'),
-                'securitySchemes': component_get('securitySchemes'),
-                'responses': component_get('responses'),
-                'headers': component_get('headers'),
+            "components": {
+                "schemas": component_get("schemas"),
+                "examples": component_get("examples"),
+                "requestBodies": component_get("requestBodies"),
+                "parameters": component_get("parameters"),
+                "securitySchemes": component_get("securitySchemes"),
+                "responses": component_get("responses"),
+                "headers": component_get("headers"),
             }
         }
 
-        self._request_body = operation.get('requestBody', {})
+        self._request_body = operation.get("requestBody", {})
 
-        self._parameters = operation.get('parameters', [])
+        self._parameters = operation.get("parameters", [])
         if path_parameters:
             self._parameters += path_parameters
 
-        self._responses = operation.get('responses', {})
+        self._responses = operation.get("responses", {})
 
         # TODO figure out how to support multiple mimetypes
         # NOTE we currently just combine all of the possible mimetypes,
         #      but we need to refactor to support mimetypes by response code
         response_content_types = []
         for _, defn in self._responses.items():
-            response_content_types += defn.get('content', {}).keys()
-        self._produces = response_content_types or ['application/json']
+            response_content_types += defn.get("content", {}).keys()
+        self._produces = response_content_types or ["application/json"]
 
-        request_content = self._request_body.get('content', {})
-        self._consumes = list(request_content.keys()) or ['application/json']
+        request_content = self._request_body.get("content", {})
+        self._consumes = list(request_content.keys()) or ["application/json"]
 
-        logger.debug('consumes: %s' % self.consumes)
-        logger.debug('produces: %s' % self.produces)
+        logger.debug("consumes: %s" % self.consumes)
+        logger.debug("produces: %s" % self.produces)
 
     @classmethod
     def from_spec(cls, spec, api, path, method, resolver, *args, **kwargs):
@@ -141,7 +155,7 @@ def from_spec(cls, spec, api, path, method, resolver, *args, **kwargs):
             app_security=spec.security,
             components=spec.components,
             *args,
-            **kwargs
+            **kwargs,
         )
 
     @property
@@ -162,13 +176,11 @@ def produces(self):
 
     def with_definitions(self, schema):
         if self.components:
-            schema['schema']['components'] = self.components
+            schema["schema"]["components"] = self.components
         return schema
 
     def response_schema(self, status_code=None, content_type=None):
-        response_definition = self.response_definition(
-            status_code, content_type
-        )
+        response_definition = self.response_definition(status_code, content_type)
         content_definition = response_definition.get("content", response_definition)
         content_definition = content_definition.get(content_type, content_definition)
         if "schema" in content_definition:
@@ -183,12 +195,10 @@ def example_response(self, status_code=None, content_type=None):
         status_code = status_code or sorted(self._responses.keys())[0]
 
         content_type = content_type or self.get_mimetype()
-        examples_path = [str(status_code), 'content', content_type, 'examples']
-        example_path = [str(status_code), 'content', content_type, 'example']
-        schema_example_path = [
-            str(status_code), 'content', content_type, 'schema', 'example'
-        ]
-        schema_path = [str(status_code), 'content', content_type, 'schema']
+        examples_path = [str(status_code), "content", content_type, "examples"]
+        example_path = [str(status_code), "content", content_type, "example"]
+        schema_example_path = [str(status_code), "content", content_type, "schema", "example"]
+        schema_path = [str(status_code), "content", content_type, "schema"]
 
         try:
             status_code = int(status_code)
@@ -196,10 +206,7 @@ def example_response(self, status_code=None, content_type=None):
             status_code = 200
         try:
             # TODO also use example header?
-            return (
-                list(deep_get(self._responses, examples_path).values())[0]['value'],
-                status_code
-            )
+            return (list(deep_get(self._responses, examples_path).values())[0]["value"], status_code)
         except (KeyError, IndexError):
             pass
         try:
@@ -207,14 +214,12 @@ def example_response(self, status_code=None, content_type=None):
         except KeyError:
             pass
         try:
-            return (deep_get(self._responses, schema_example_path),
-                    status_code)
+            return (deep_get(self._responses, schema_example_path), status_code)
         except KeyError:
             pass
 
         try:
-            return (self._nested_example(deep_get(self._responses, schema_path)),
-                    status_code)
+            return (self._nested_example(deep_get(self._responses, schema_path)), status_code)
         except KeyError:
             return (None, status_code)
 
@@ -225,8 +230,7 @@ def _nested_example(self, schema):
             pass
         try:
             # Recurse if schema is an object
-            return {key: self._nested_example(value)
-                    for (key, value) in schema["properties"].items()}
+            return {key: self._nested_example(value) for (key, value) in schema["properties"].items()}
         except KeyError:
             pass
         try:
@@ -240,12 +244,12 @@ def get_path_parameter_types(self):
         path_parameters = (p for p in self.parameters if p["in"] == "path")
         for path_defn in path_parameters:
             path_schema = path_defn["schema"]
-            if path_schema.get('type') == 'string' and path_schema.get('format') == 'path':
+            if path_schema.get("type") == "string" and path_schema.get("format") == "path":
                 # path is special case for type 'string'
-                path_type = 'path'
+                path_type = "path"
             else:
-                path_type = path_schema.get('type')
-            types[path_defn['name']] = path_type
+                path_type = path_schema.get("type")
+            types[path_defn["name"]] = path_type
         return types
 
     @property
@@ -253,7 +257,7 @@ def body_schema(self):
         """
         The body schema definition for this operation.
         """
-        return self.body_definition.get('schema', {})
+        return self.body_definition.get("schema", {})
 
     @property
     def body_definition(self):
@@ -266,10 +270,8 @@ def body_definition(self):
         """
         if self._request_body:
             if len(self.consumes) > 1:
-                logger.warning(
-                    'this operation accepts multiple content types, using %s',
-                    self.consumes[0])
-            res = self._request_body.get('content', {}).get(self.consumes[0], {})
+                logger.warning("this operation accepts multiple content types, using %s", self.consumes[0])
+            res = self._request_body.get("content", {}).get(self.consumes[0], {})
             return self.with_definitions(res)
         return {}
 
@@ -278,15 +280,18 @@ def _get_body_argument(self, body, arguments, has_kwargs, sanitize):
             return {}
 
         # get the deprecated name from the body-schema for legacy firetail compat
-        x_body_name = sanitize(self.body_schema.get('x-body-name'))
+        x_body_name = sanitize(self.body_schema.get("x-body-name"))
 
         if x_body_name:
-            warnings.warn('x-body-name within the requestBody schema will be deprecated in the '
-                          'next major version. It should be provided directly under '
-                          'the requestBody instead.', DeprecationWarning)
+            warnings.warn(
+                "x-body-name within the requestBody schema will be deprecated in the "
+                "next major version. It should be provided directly under "
+                "the requestBody instead.",
+                DeprecationWarning,
+            )
 
         # prefer the x-body-name as an extension of requestBody, fallback to deprecated schema name, default 'body'
-        x_body_name = sanitize(self.request_body.get('x-body-name', x_body_name or 'body'))
+        x_body_name = sanitize(self.request_body.get("x-body-name", x_body_name or "body"))
 
         if self.consumes[0] in FORM_CONTENT_TYPES:
             result = self._get_body_argument_form(body)
@@ -304,16 +309,15 @@ def _get_body_argument_json(self, body):
             return None
 
         if body is None:
-            default_body = self.body_schema.get('default', {})
+            default_body = self.body_schema.get("default", {})
             return deepcopy(default_body)
 
         return body
 
     def _get_body_argument_form(self, body):
         # now determine the actual value for the body (whether it came in or is default)
-        default_body = self.body_schema.get('default', {})
-        body_props = {k: {"schema": v} for k, v
-                      in self.body_schema.get("properties", {}).items()}
+        default_body = self.body_schema.get("default", {})
+        body_props = {k: {"schema": v} for k, v in self.body_schema.get("properties", {}).items()}
 
         # by OpenAPI specification `additionalProperties` defaults to `true`
         # see: https://github.com/OAI/OpenAPI-Specification/blame/3.0.2/versions/3.0.2.md#L2305
@@ -355,14 +359,13 @@ def _get_typed_body_values(self, body_arg, body_props, additional_props):
         return res
 
     def _build_default_obj_recursive(self, _properties, res):
-        """ takes disparate and nested default keys, and builds up a default object
-        """
+        """takes disparate and nested default keys, and builds up a default object"""
         for key, prop in _properties.items():
-            if 'default' in prop and key not in res:
-                res[key] = copy(prop['default'])
-            elif prop.get('type') == 'object' and 'properties' in prop:
+            if "default" in prop and key not in res:
+                res[key] = copy(prop["default"])
+            elif prop.get("type") == "object" and "properties" in prop:
                 res.setdefault(key, {})
-                res[key] = self._build_default_obj_recursive(prop['properties'], res[key])
+                res[key] = self._build_default_obj_recursive(prop["properties"], res[key])
         return res
 
     def _get_default_obj(self, schema):
@@ -385,15 +388,12 @@ def _get_query_defaults(self, query_defns):
         return defaults
 
     def _get_query_arguments(self, query, arguments, has_kwargs, sanitize):
-        query_defns = {p["name"]: p
-                       for p in self.parameters
-                       if p["in"] == "query"}
+        query_defns = {p["name"]: p for p in self.parameters if p["in"] == "query"}
         default_query_params = self._get_query_defaults(query_defns)
 
         query_arguments = deepcopy(default_query_params)
         query_arguments = deep_merge(query_arguments, query)
-        return self._query_args_helper(query_defns, query_arguments,
-                                       arguments, has_kwargs, sanitize)
+        return self._query_args_helper(query_defns, query_arguments, arguments, has_kwargs, sanitize)
 
     def _get_val_from_param(self, value, query_defn):
         query_schema = query_defn["schema"]
diff --git a/firetail/operations/secure.py b/firetail/operations/secure.py
index 5f22560..1d90cd9 100644
--- a/firetail/operations/secure.py
+++ b/firetail/operations/secure.py
@@ -9,11 +9,10 @@
 
 logger = logging.getLogger("firetail.operations.secure")
 
-DEFAULT_MIMETYPE = 'application/json'
+DEFAULT_MIMETYPE = "application/json"
 
 
 class SecureOperation:
-
     def __init__(self, api, security, security_schemes):
         """
         :param security: list of security rules the application uses by default
@@ -70,7 +69,7 @@ def security_decorator(self):
 
         :rtype: types.FunctionType
         """
-        logger.debug('... Security: %s', self.security, extra=vars(self))
+        logger.debug("... Security: %s", self.security, extra=vars(self))
         if not self.security:
             return self._api.security_handler_factory.security_passthrough
 
@@ -85,7 +84,7 @@ def security_decorator(self):
             for scheme_name, required_scopes in security_req.items():
                 security_scheme = self.security_schemes[scheme_name]
 
-                if security_scheme['type'] == 'oauth2':
+                if security_scheme["type"] == "oauth2":
                     if oauth:
                         logger.warning(
                             "... multiple OAuth2 security schemes in AND fashion not supported", extra=vars(self)
@@ -99,10 +98,11 @@ def security_decorator(self):
                         break
 
                     sec_req_funcs[scheme_name] = self._api.security_handler_factory.verify_oauth(
-                        token_info_func, scope_validate_func, required_scopes)
+                        token_info_func, scope_validate_func, required_scopes
+                    )
 
                 # Swagger 2.0
-                elif security_scheme['type'] == 'basic':
+                elif security_scheme["type"] == "basic":
                     basic_info_func = self._api.security_handler_factory.get_basicinfo_func(security_scheme)
                     if not basic_info_func:
                         logger.warning("... x-basicInfoFunc missing", extra=vars(self))
@@ -111,16 +111,16 @@ def security_decorator(self):
                     sec_req_funcs[scheme_name] = self._api.security_handler_factory.verify_basic(basic_info_func)
 
                 # OpenAPI 3.0.0
-                elif security_scheme['type'] == 'http':
-                    scheme = security_scheme['scheme'].lower()
-                    if scheme == 'basic':
+                elif security_scheme["type"] == "http":
+                    scheme = security_scheme["scheme"].lower()
+                    if scheme == "basic":
                         basic_info_func = self._api.security_handler_factory.get_basicinfo_func(security_scheme)
                         if not basic_info_func:
                             logger.warning("... x-basicInfoFunc missing", extra=vars(self))
                             break
 
                         sec_req_funcs[scheme_name] = self._api.security_handler_factory.verify_basic(basic_info_func)
-                    elif scheme == 'bearer':
+                    elif scheme == "bearer":
                         bearer_info_func = self._api.security_handler_factory.get_bearerinfo_func(security_scheme)
                         if not bearer_info_func:
                             logger.warning("... x-bearerInfoFunc missing", extra=vars(self))
@@ -130,9 +130,9 @@ def security_decorator(self):
                         logger.warning("... Unsupported http authorization scheme %s" % scheme, extra=vars(self))
                         break
 
-                elif security_scheme['type'] == 'apiKey':
-                    scheme = security_scheme.get('x-authentication-scheme', '').lower()
-                    if scheme == 'bearer':
+                elif security_scheme["type"] == "apiKey":
+                    scheme = security_scheme.get("x-authentication-scheme", "").lower()
+                    if scheme == "bearer":
                         bearer_info_func = self._api.security_handler_factory.get_bearerinfo_func(security_scheme)
                         if not bearer_info_func:
                             logger.warning("... x-bearerInfoFunc missing", extra=vars(self))
@@ -145,12 +145,12 @@ def security_decorator(self):
                             break
 
                         sec_req_funcs[scheme_name] = self._api.security_handler_factory.verify_api_key(
-                            apikey_info_func, security_scheme['in'], security_scheme['name']
+                            apikey_info_func, security_scheme["in"], security_scheme["name"]
                         )
 
                 else:
                     logger.warning(
-                        "... Unsupported security scheme type %s" % security_scheme['type'], extra=vars(self)
+                        "... Unsupported security scheme type %s" % security_scheme["type"], extra=vars(self)
                     )
                     break
             else:
diff --git a/firetail/operations/swagger2.py b/firetail/operations/swagger2.py
index 115f21e..3173d0e 100644
--- a/firetail/operations/swagger2.py
+++ b/firetail/operations/swagger2.py
@@ -26,12 +26,29 @@ class Swagger2Operation(AbstractOperation):
     and deserialization.
     """
 
-    def __init__(self, api, method, path, operation, resolver, app_produces, app_consumes,
-                 path_parameters=None, app_security=None, security_definitions=None,
-                 definitions=None, parameter_definitions=None,
-                 response_definitions=None, validate_responses=False, strict_validation=False,
-                 randomize_endpoint=None, validator_map=None, pythonic_params=False,
-                 uri_parser_class=None, pass_context_arg_name=None):
+    def __init__(
+        self,
+        api,
+        method,
+        path,
+        operation,
+        resolver,
+        app_produces,
+        app_consumes,
+        path_parameters=None,
+        app_security=None,
+        security_definitions=None,
+        definitions=None,
+        parameter_definitions=None,
+        response_definitions=None,
+        validate_responses=False,
+        strict_validation=False,
+        randomize_endpoint=None,
+        validator_map=None,
+        pythonic_params=False,
+        uri_parser_class=None,
+        pass_context_arg_name=None,
+    ):
         """
         :param api: api that this operation is attached to
         :type api: apis.AbstractAPI
@@ -78,10 +95,10 @@ def __init__(self, api, method, path, operation, resolver, app_produces, app_con
             name.
         :type pass_context_arg_name: str|None
         """
-        app_security = operation.get('security', app_security)
+        app_security = operation.get("security", app_security)
         uri_parser_class = uri_parser_class or Swagger2URIParser
 
-        self._router_controller = operation.get('x-swagger-router-controller')
+        self._router_controller = operation.get("x-swagger-router-controller")
 
         super().__init__(
             api=api,
@@ -97,29 +114,29 @@ def __init__(self, api, method, path, operation, resolver, app_produces, app_con
             validator_map=validator_map,
             pythonic_params=pythonic_params,
             uri_parser_class=uri_parser_class,
-            pass_context_arg_name=pass_context_arg_name
+            pass_context_arg_name=pass_context_arg_name,
         )
 
-        self._produces = operation.get('produces', app_produces)
-        self._consumes = operation.get('consumes', app_consumes)
+        self._produces = operation.get("produces", app_produces)
+        self._consumes = operation.get("consumes", app_consumes)
 
         self.definitions = definitions or {}
 
         self.definitions_map = {
-            'definitions': self.definitions,
-            'parameters': parameter_definitions,
-            'responses': response_definitions
+            "definitions": self.definitions,
+            "parameters": parameter_definitions,
+            "responses": response_definitions,
         }
 
-        self._parameters = operation.get('parameters', [])
+        self._parameters = operation.get("parameters", [])
         if path_parameters:
             self._parameters += path_parameters
 
-        self._responses = operation.get('responses', {})
+        self._responses = operation.get("responses", {})
         logger.debug(self._responses)
 
-        logger.debug('consumes: %s', self.consumes)
-        logger.debug('produces: %s', self.produces)
+        logger.debug("consumes: %s", self.consumes)
+        logger.debug("produces: %s", self.produces)
 
     @classmethod
     def from_spec(cls, spec, api, path, method, resolver, *args, **kwargs):
@@ -157,23 +174,21 @@ def get_path_parameter_types(self):
         types = {}
         path_parameters = (p for p in self.parameters if p["in"] == "path")
         for path_defn in path_parameters:
-            if path_defn.get('type') == 'string' and path_defn.get('format') == 'path':
+            if path_defn.get("type") == "string" and path_defn.get("format") == "path":
                 # path is special case for type 'string'
-                path_type = 'path'
+                path_type = "path"
             else:
-                path_type = path_defn.get('type')
-            types[path_defn['name']] = path_type
+                path_type = path_defn.get("type")
+            types[path_defn["name"]] = path_type
         return types
 
     def with_definitions(self, schema):
         if "schema" in schema:
-            schema['schema']['definitions'] = self.definitions
+            schema["schema"]["definitions"] = self.definitions
         return schema
 
     def response_schema(self, status_code=None, content_type=None):
-        response_definition = self.response_definition(
-            status_code, content_type
-        )
+        response_definition = self.response_definition(status_code, content_type)
         return self.with_definitions(response_definition.get("schema", {}))
 
     def example_response(self, status_code=None, *args, **kwargs):
@@ -182,30 +197,25 @@ def example_response(self, status_code=None, *args, **kwargs):
         """
         # simply use the first/lowest status code, this is probably 200 or 201
         status_code = status_code or sorted(self._responses.keys())[0]
-        examples_path = [str(status_code), 'examples']
-        schema_example_path = [str(status_code), 'schema', 'example']
-        schema_path = [str(status_code), 'schema']
+        examples_path = [str(status_code), "examples"]
+        schema_example_path = [str(status_code), "schema", "example"]
+        schema_path = [str(status_code), "schema"]
 
         try:
             status_code = int(status_code)
         except ValueError:
             status_code = 200
         try:
-            return (
-                list(deep_get(self._responses, examples_path).values())[0],
-                status_code
-            )
+            return (list(deep_get(self._responses, examples_path).values())[0], status_code)
         except KeyError:
             pass
         try:
-            return (deep_get(self._responses, schema_example_path),
-                    status_code)
+            return (deep_get(self._responses, schema_example_path), status_code)
         except KeyError:
             pass
 
         try:
-            return (self._nested_example(deep_get(self._responses, schema_path)),
-                    status_code)
+            return (self._nested_example(deep_get(self._responses, schema_path)), status_code)
         except KeyError:
             return (None, status_code)
 
@@ -216,8 +226,7 @@ def _nested_example(self, schema):
             pass
         try:
             # Recurse if schema is an object
-            return {key: self._nested_example(value)
-                    for (key, value) in schema["properties"].items()}
+            return {key: self._nested_example(value) for (key, value) in schema["properties"].items()}
         except KeyError:
             pass
         try:
@@ -231,7 +240,7 @@ def body_schema(self):
         """
         The body schema definition for this operation.
         """
-        return self.with_definitions(self.body_definition).get('schema', {})
+        return self.with_definitions(self.body_definition).get("schema", {})
 
     @property
     def body_definition(self):
@@ -242,40 +251,30 @@ def body_definition(self):
 
         :rtype: dict
         """
-        body_parameters = [p for p in self.parameters if p['in'] == 'body']
+        body_parameters = [p for p in self.parameters if p["in"] == "body"]
         if len(body_parameters) > 1:
             raise InvalidSpecification(
-                "{method} {path} There can be one 'body' parameter at most".format(
-                    method=self.method,
-                    path=self.path))
+                "{method} {path} There can be one 'body' parameter at most".format(method=self.method, path=self.path)
+            )
         return body_parameters[0] if body_parameters else {}
 
     def _get_query_arguments(self, query, arguments, has_kwargs, sanitize):
-        query_defns = {p["name"]: p
-                       for p in self.parameters
-                       if p["in"] == "query"}
-        default_query_params = {k: v['default']
-                                for k, v in query_defns.items()
-                                if 'default' in v}
+        query_defns = {p["name"]: p for p in self.parameters if p["in"] == "query"}
+        default_query_params = {k: v["default"] for k, v in query_defns.items() if "default" in v}
         query_arguments = deepcopy(default_query_params)
         query_arguments.update(query)
-        return self._query_args_helper(query_defns, query_arguments,
-                                       arguments, has_kwargs, sanitize)
+        return self._query_args_helper(query_defns, query_arguments, arguments, has_kwargs, sanitize)
 
     def _get_body_argument(self, body, arguments, has_kwargs, sanitize):
         kwargs = {}
-        body_parameters = [p for p in self.parameters if p['in'] == 'body'] or [{}]
+        body_parameters = [p for p in self.parameters if p["in"] == "body"] or [{}]
         if body is None:
-            body = deepcopy(body_parameters[0].get('schema', {}).get('default'))
-        body_name = sanitize(body_parameters[0].get('name'))
+            body = deepcopy(body_parameters[0].get("schema", {}).get("default"))
+        body_name = sanitize(body_parameters[0].get("name"))
 
-        form_defns = {p['name']: p
-                      for p in self.parameters
-                      if p['in'] == 'formData'}
+        form_defns = {p["name"]: p for p in self.parameters if p["in"] == "formData"}
 
-        default_form_params = {k: v['default']
-                               for k, v in form_defns.items()
-                               if 'default' in v}
+        default_form_params = {k: v["default"] for k, v in form_defns.items() if "default" in v}
 
         # Add body parameters
         if body_name:
@@ -292,16 +291,15 @@ def _get_body_argument(self, body, arguments, has_kwargs, sanitize):
         for key, value in form_arguments.items():
             sanitized_key = sanitize(key)
             if not has_kwargs and sanitized_key not in arguments:
-                logger.debug("FormData parameter '%s' (sanitized: '%s') not in function arguments",
-                             key, sanitized_key)
+                logger.debug("FormData parameter '%s' (sanitized: '%s') not in function arguments", key, sanitized_key)
             else:
-                logger.debug("FormData parameter '%s' (sanitized: '%s') in function arguments",
-                             key, sanitized_key)
+                logger.debug("FormData parameter '%s' (sanitized: '%s') in function arguments", key, sanitized_key)
                 try:
                     form_defn = form_defns[key]
                 except KeyError:  # pragma: no cover
-                    logger.error("Function argument '%s' (non-sanitized: %s) not defined in specification",
-                                 key, sanitized_key)
+                    logger.error(
+                        "Function argument '%s' (non-sanitized: %s) not defined in specification", key, sanitized_key
+                    )
                 else:
                     kwargs[sanitized_key] = self._get_val_from_param(value, form_defn)
         return kwargs
diff --git a/firetail/options.py b/firetail/options.py
index bdc9bab..546a6ab 100644
--- a/firetail/options.py
+++ b/firetail/options.py
@@ -22,10 +22,10 @@ def __init__(self, options=None, oas_version=(2,)):
         self._options = {}
         self.oas_version = oas_version
         if self.oas_version >= (3, 0, 0):
-            self.openapi_spec_name = '/openapi.json'
+            self.openapi_spec_name = "/openapi.json"
             self.swagger_ui_local_path = swagger_ui_3_path
         else:
-            self.openapi_spec_name = '/swagger.json'
+            self.openapi_spec_name = "/swagger.json"
             self.swagger_ui_local_path = swagger_ui_2_path
 
         if options:
@@ -56,11 +56,10 @@ def openapi_spec_available(self):
 
         Default: True
         """
-        deprecated_option = self._options.get('swagger_json', True)
-        serve_spec = self._options.get('serve_spec', deprecated_option)
-        if 'swagger_json' in self._options:
-            deprecation_warning = ("The 'swagger_json' option is deprecated. "
-                                   "Please use 'serve_spec' instead")
+        deprecated_option = self._options.get("swagger_json", True)
+        serve_spec = self._options.get("serve_spec", deprecated_option)
+        if "swagger_json" in self._options:
+            deprecation_warning = "The 'swagger_json' option is deprecated. " "Please use 'serve_spec' instead"
             logger.warning(deprecation_warning)
         return serve_spec
 
@@ -73,10 +72,9 @@ def openapi_console_ui_available(self):
 
         Default: True
         """
-        if (self._options.get('swagger_ui', True) and
-                self.openapi_console_ui_from_dir is None):
+        if self._options.get("swagger_ui", True) and self.openapi_console_ui_from_dir is None:
             return False
-        return self._options.get('swagger_ui', True)
+        return self._options.get("swagger_ui", True)
 
     @property
     def openapi_spec_path(self):
@@ -86,7 +84,7 @@ def openapi_spec_path(self):
 
         Default: /openapi.json for openapi3, otherwise /swagger.json
         """
-        return self._options.get('openapi_spec_path', self.openapi_spec_name)
+        return self._options.get("openapi_spec_path", self.openapi_spec_name)
 
     @property
     def openapi_console_ui_path(self):
@@ -96,7 +94,7 @@ def openapi_console_ui_path(self):
 
         Default: /ui
         """
-        return self._options.get('swagger_url', '/ui')
+        return self._options.get("swagger_url", "/ui")
 
     @property
     def openapi_console_ui_from_dir(self):
@@ -107,7 +105,7 @@ def openapi_console_ui_from_dir(self):
 
         Default: Firetail's vendored version of the OpenAPI Console UI.
         """
-        return self._options.get('swagger_path', self.swagger_ui_local_path)
+        return self._options.get("swagger_path", self.swagger_ui_local_path)
 
     @property
     def openapi_console_ui_config(self):
@@ -117,7 +115,7 @@ def openapi_console_ui_config(self):
 
         Default: None
         """
-        return self._options.get('swagger_ui_config', None)
+        return self._options.get("swagger_ui_config", None)
 
     @property
     def openapi_console_ui_index_template_variables(self):
@@ -127,7 +125,7 @@ def openapi_console_ui_index_template_variables(self):
 
         Default: {}
         """
-        return self._options.get('swagger_ui_template_arguments', {})
+        return self._options.get("swagger_ui_template_arguments", {})
 
     @property
     def uri_parser_class(self):
@@ -136,7 +134,7 @@ def uri_parser_class(self):
         The class to use for parsing URIs into path and query parameters.
         Default: None
         """
-        return self._options.get('uri_parser_class', None)
+        return self._options.get("uri_parser_class", None)
 
 
 def filter_values(dictionary):
diff --git a/firetail/problem.py b/firetail/problem.py
index e50237f..6106160 100644
--- a/firetail/problem.py
+++ b/firetail/problem.py
@@ -34,17 +34,13 @@ def problem(status, title, detail, type=None, instance=None, headers=None, ext=N
     :rtype: FiretailResponse
     """
     if not type:
-        type = 'about:blank'
+        type = "about:blank"
 
-    problem_response = {'type': type, 'title': title, 'detail': detail, 'status': status}
+    problem_response = {"type": type, "title": title, "detail": detail, "status": status}
     if instance:
-        problem_response['instance'] = instance
+        problem_response["instance"] = instance
     if ext:
         problem_response.update(ext)
 
-    mimetype = content_type = 'application/problem+json'
-    return FiretailResponse(status,
-                            mimetype,
-                            content_type,
-                            body=problem_response,
-                            headers=headers)
+    mimetype = content_type = "application/problem+json"
+    return FiretailResponse(status, mimetype, content_type, body=problem_response, headers=headers)
diff --git a/firetail/resolver.py b/firetail/resolver.py
index 0b723ba..cd898e9 100644
--- a/firetail/resolver.py
+++ b/firetail/resolver.py
@@ -12,7 +12,7 @@
 import firetail.utils as utils
 from firetail.exceptions import ResolverError
 
-logger = logging.getLogger('firetail.resolver')
+logger = logging.getLogger("firetail.resolver")
 
 
 class Resolution:
@@ -56,7 +56,7 @@ def resolve_operation_id(self, operation):
         router_controller = operation.router_controller
         if router_controller is None:
             return operation_id
-        return f'{router_controller}.{operation_id}'
+        return f"{router_controller}.{operation_id}"
 
     def resolve_function_from_operation_id(self, operation_id):
         """
@@ -77,6 +77,7 @@ class RelativeResolver(Resolver):
     """
     Resolves endpoint functions relative to a given root path or module.
     """
+
     def __init__(self, root_path, function_resolver=utils.get_function_from_name):
         """
         :param root_path: The root path relative to which an operationId is resolved.
@@ -103,8 +104,8 @@ def resolve_operation_id(self, operation):
         operation_id = operation.operation_id
         router_controller = operation.router_controller
         if router_controller is None:
-            return f'{self.root_path}.{operation_id}'
-        return f'{router_controller}.{operation_id}'
+            return f"{self.root_path}.{operation_id}"
+        return f"{router_controller}.{operation_id}"
 
 
 class RestyResolver(Resolver):
@@ -112,7 +113,7 @@ class RestyResolver(Resolver):
     Resolves endpoint functions using REST semantics (unless overridden by specifying operationId)
     """
 
-    def __init__(self, default_module_name, collection_endpoint_name='search'):
+    def __init__(self, default_module_name, collection_endpoint_name="search"):
         """
         :param default_module_name: Default module name for operations
         :type default_module_name: str
@@ -140,15 +141,13 @@ def resolve_operation_id_using_rest_semantics(self, operation):
         """
 
         # Split the path into components delimited by '/'
-        path_components = [c for c in operation.path.split('/') if len(c)]
+        path_components = [c for c in operation.path.split("/") if len(c)]
 
         def is_var(component):
             """True if the path component is a var. eg, '{id}'"""
-            return (component[0] == '{') and (component[-1] == '}')
+            return (component[0] == "{") and (component[-1] == "}")
 
-        resource_name = '.'.join(
-            [c for c in path_components if not is_var(c)]
-        ).replace('-', '_')
+        resource_name = ".".join([c for c in path_components if not is_var(c)]).replace("-", "_")
 
         def get_controller_name():
             x_router_controller = operation.router_controller
@@ -159,21 +158,18 @@ def get_controller_name():
                 name = x_router_controller
 
             elif resource_name:
-                name += '.' + resource_name
+                name += "." + resource_name
 
             return name
 
         def get_function_name():
             method = operation.method
 
-            is_collection_endpoint = \
-                method.lower() == 'get' \
-                and len(resource_name) \
-                and not is_var(path_components[-1])
+            is_collection_endpoint = method.lower() == "get" and len(resource_name) and not is_var(path_components[-1])
 
             return self.collection_endpoint_name if is_collection_endpoint else method.lower()
 
-        return f'{get_controller_name()}.{get_function_name()}'
+        return f"{get_controller_name()}.{get_function_name()}"
 
 
 class MethodViewResolver(RestyResolver):
@@ -210,8 +206,8 @@ def resolve_operation_id(self, operation):
 
         # Use RestyResolver to get operation_id for us (follow their naming conventions/structure)
         operation_id = self.resolve_operation_id_using_rest_semantics(operation)
-        module_name, view_base, meth_name = operation_id.rsplit('.', 2)
-        view_name = camelize(view_base) + 'View'
+        module_name, view_base, meth_name = operation_id.rsplit(".", 2)
+        view_name = camelize(view_base) + "View"
 
         return f"{module_name}.{view_name}.{meth_name}"
 
@@ -223,8 +219,8 @@ def resolve_function_from_operation_id(self, operation_id):
         """
 
         try:
-            module_name, view_name, meth_name = operation_id.rsplit('.', 2)
-            if operation_id and not view_name.endswith('View'):
+            module_name, view_name, meth_name = operation_id.rsplit(".", 2)
+            if operation_id and not view_name.endswith("View"):
                 # If operation_id is not a view then assume it is a standard function
                 return self.function_resolver(operation_id)
 
@@ -243,8 +239,7 @@ def resolve_function_from_operation_id(self, operation_id):
             # Return the method function of the class
             return func
         except ImportError as e:
-            msg = 'Cannot resolve operationId "{}"! Import error was "{}"'.format(
-                operation_id, str(e))
+            msg = 'Cannot resolve operationId "{}"! Import error was "{}"'.format(operation_id, str(e))
             raise ResolverError(msg, sys.exc_info())
         except (AttributeError, ValueError) as e:
             raise ResolverError(str(e), sys.exc_info())
diff --git a/firetail/security/aiohttp_security_handler_factory.py b/firetail/security/aiohttp_security_handler_factory.py
index 6750828..f9b03bc 100644
--- a/firetail/security/aiohttp_security_handler_factory.py
+++ b/firetail/security/aiohttp_security_handler_factory.py
@@ -8,7 +8,7 @@
 
 from .async_security_handler_factory import AbstractAsyncSecurityHandlerFactory
 
-logger = logging.getLogger('firetail.api.security')
+logger = logging.getLogger("firetail.api.security")
 
 
 class AioHttpSecurityHandlerFactory(AbstractAsyncSecurityHandlerFactory):
@@ -27,13 +27,15 @@ def get_token_info_remote(self, token_info_url):
         :type token_info_url: str
         :rtype: types.FunctionType
         """
+
         async def wrapper(token):
             if not self.client_session:
                 # Must be created in a coroutine
                 self.client_session = aiohttp.ClientSession()
-            headers = {'Authorization': f'Bearer {token}'}
+            headers = {"Authorization": f"Bearer {token}"}
             token_request = await self.client_session.get(token_info_url, headers=headers, timeout=5)
             if token_request.status != 200:
                 return None
             return token_request.json()
+
         return wrapper
diff --git a/firetail/security/async_security_handler_factory.py b/firetail/security/async_security_handler_factory.py
index eec4605..a80d564 100644
--- a/firetail/security/async_security_handler_factory.py
+++ b/firetail/security/async_security_handler_factory.py
@@ -11,7 +11,7 @@
 from ..exceptions import OAuthProblem, OAuthResponseProblem, OAuthScopeProblem
 from .security_handler_factory import AbstractSecurityHandlerFactory
 
-logger = logging.getLogger('firetail.api.security')
+logger = logging.getLogger("firetail.api.security")
 
 
 class AbstractAsyncSecurityHandlerFactory(AbstractSecurityHandlerFactory):
@@ -36,14 +36,14 @@ async def wrapper(request, *args, required_scopes=None):
         return wrapper
 
     def check_oauth_func(self, token_info_func, scope_validate_func):
-        get_token_info = self._generic_check(token_info_func, 'Provided token is not valid')
+        get_token_info = self._generic_check(token_info_func, "Provided token is not valid")
         need_to_add_context, _ = self._need_to_add_context_or_scopes(scope_validate_func)
 
         async def wrapper(request, token, required_scopes):
             token_info = await get_token_info(request, token, required_scopes=required_scopes)
 
             # Fallback to 'scopes' for backward compatibility
-            token_scopes = token_info.get('scope', token_info.get('scopes', ''))
+            token_scopes = token_info.get("scope", token_info.get("scopes", ""))
 
             kwargs = {}
             if need_to_add_context:
@@ -53,12 +53,13 @@ async def wrapper(request, token, required_scopes):
                 validation = await validation
             if not validation:
                 raise OAuthScopeProblem(
-                    description='Provided token doesn\'t have the required scope',
+                    description="Provided token doesn't have the required scope",
                     required_scopes=required_scopes,
-                    token_scopes=token_scopes
-                    )
+                    token_scopes=token_scopes,
+                )
 
             return token_info
+
         return wrapper
 
     @classmethod
@@ -82,11 +83,11 @@ async def wrapper(request):
                     cls._raise_most_specific(errors)
                 else:
                     logger.info("... No auth provided. Aborting with 401.")
-                    raise OAuthProblem(description='No authorization token provided')
+                    raise OAuthProblem(description="No authorization token provided")
 
             # Fallback to 'uid' for backward compatibility
-            request.context['user'] = token_info.get('sub', token_info.get('uid'))
-            request.context['token_info'] = token_info
+            request.context["user"] = token_info.get("sub", token_info.get("uid"))
+            request.context["token_info"] = token_info
             return function(request)
 
         return wrapper
diff --git a/firetail/security/flask_security_handler_factory.py b/firetail/security/flask_security_handler_factory.py
index 610aa18..7000aee 100644
--- a/firetail/security/flask_security_handler_factory.py
+++ b/firetail/security/flask_security_handler_factory.py
@@ -9,8 +9,8 @@
 # use connection pool for OAuth tokeninfo
 adapter = requests.adapters.HTTPAdapter(pool_connections=100, pool_maxsize=100)
 session = requests.Session()
-session.mount('http://', adapter)
-session.mount('https://', adapter)
+session.mount("http://", adapter)
+session.mount("https://", adapter)
 
 
 class FlaskSecurityHandlerFactory(AbstractSecurityHandlerFactory):
@@ -25,6 +25,7 @@ def get_token_info_remote(self, token_info_url):
         :type token_info_url: str
         :rtype: types.FunctionType
         """
+
         def wrapper(token):
             """
             Retrieve oauth token_info remotely using HTTP
@@ -32,9 +33,10 @@ def wrapper(token):
             :type token: str
             :rtype: dict
             """
-            headers = {'Authorization': f'Bearer {token}'}
+            headers = {"Authorization": f"Bearer {token}"}
             token_request = session.get(token_info_url, headers=headers, timeout=5)
             if not token_request.ok:
                 return None
             return token_request.json()
+
         return wrapper
diff --git a/firetail/security/security_handler_factory.py b/firetail/security/security_handler_factory.py
index 9ba9ab9..f71bd85 100644
--- a/firetail/security/security_handler_factory.py
+++ b/firetail/security/security_handler_factory.py
@@ -21,7 +21,7 @@
 )
 from ..utils import get_function_from_name
 
-logger = logging.getLogger('firetail.api.security')
+logger = logging.getLogger("firetail.api.security")
 
 
 class AbstractSecurityHandlerFactory(abc.ABC):
@@ -38,8 +38,9 @@ class AbstractSecurityHandlerFactory(abc.ABC):
 
         verify helpers (used inside wrappers): get_auth_header_value, get_cookie_value
     """
+
     no_value = object()
-    required_scopes_kw = 'required_scopes'
+    required_scopes_kw = "required_scopes"
 
     def __init__(self, pass_context_arg_name):
         self.pass_context_arg_name = pass_context_arg_name
@@ -61,12 +62,11 @@ def get_tokeninfo_func(self, security_definition: dict) -> t.Optional[t.Callable
         >>> get_tokeninfo_url({'x-tokenInfoFunc': 'foo.bar'})
         '<function foo.bar>'
         """
-        token_info_func = self._get_function(security_definition, "x-tokenInfoFunc", 'TOKENINFO_FUNC')
+        token_info_func = self._get_function(security_definition, "x-tokenInfoFunc", "TOKENINFO_FUNC")
         if token_info_func:
             return token_info_func
 
-        token_info_url = (security_definition.get('x-tokenInfoUrl') or
-                          os.environ.get('TOKENINFO_URL'))
+        token_info_url = security_definition.get("x-tokenInfoUrl") or os.environ.get("TOKENINFO_URL")
         if token_info_url:
             return self.get_token_info_remote(token_info_url)
 
@@ -81,7 +81,7 @@ def get_scope_validate_func(cls, security_definition):
         >>> get_scope_validate_func({'x-scopeValidateFunc': 'foo.bar'})
         '<function foo.bar>'
         """
-        return cls._get_function(security_definition, "x-scopeValidateFunc", 'SCOPEVALIDATE_FUNC', cls.validate_scope)
+        return cls._get_function(security_definition, "x-scopeValidateFunc", "SCOPEVALIDATE_FUNC", cls.validate_scope)
 
     @classmethod
     def get_basicinfo_func(cls, security_definition):
@@ -92,7 +92,7 @@ def get_basicinfo_func(cls, security_definition):
         >>> get_basicinfo_func({'x-basicInfoFunc': 'foo.bar'})
         '<function foo.bar>'
         """
-        return cls._get_function(security_definition, "x-basicInfoFunc", 'BASICINFO_FUNC')
+        return cls._get_function(security_definition, "x-basicInfoFunc", "BASICINFO_FUNC")
 
     @classmethod
     def get_apikeyinfo_func(cls, security_definition):
@@ -103,7 +103,7 @@ def get_apikeyinfo_func(cls, security_definition):
         >>> get_apikeyinfo_func({'x-apikeyInfoFunc': 'foo.bar'})
         '<function foo.bar>'
         """
-        return cls._get_function(security_definition, "x-apikeyInfoFunc", 'APIKEYINFO_FUNC')
+        return cls._get_function(security_definition, "x-apikeyInfoFunc", "APIKEYINFO_FUNC")
 
     @classmethod
     def get_bearerinfo_func(cls, security_definition):
@@ -114,7 +114,7 @@ def get_bearerinfo_func(cls, security_definition):
         >>> get_bearerinfo_func({'x-bearerInfoFunc': 'foo.bar'})
         '<function foo.bar>'
         """
-        return cls._get_function(security_definition, "x-bearerInfoFunc", 'BEARERINFO_FUNC')
+        return cls._get_function(security_definition, "x-bearerInfoFunc", "BEARERINFO_FUNC")
 
     @staticmethod
     def security_passthrough(function):
@@ -151,10 +151,15 @@ def validate_scope(required_scopes, token_scopes):
         logger.debug("... Scopes required: %s", required_scopes)
         logger.debug("... Token scopes: %s", token_scopes)
         if not required_scopes <= token_scopes:
-            logger.info(textwrap.dedent("""
+            logger.info(
+                textwrap.dedent(
+                    """
                         ... Token scopes (%s) do not match the scopes necessary to call endpoint (%s).
-                         Aborting with 403.""").replace('\n', ''),
-                        token_scopes, required_scopes)
+                         Aborting with 403."""
+                ).replace("\n", ""),
+                token_scopes,
+                required_scopes,
+            )
             return False
         return True
 
@@ -167,14 +172,14 @@ def get_auth_header_value(request):
         If not Authorization, return (None, None)
         Raise OAuthProblem for invalid Authorization header
         """
-        authorization = request.headers.get('Authorization')
+        authorization = request.headers.get("Authorization")
         if not authorization:
             return None, None
 
         try:
             auth_type, value = authorization.split(None, 1)
         except ValueError:
-            raise OAuthProblem(description='Invalid authorization header')
+            raise OAuthProblem(description="Invalid authorization header")
         return auth_type.lower(), value
 
     def verify_oauth(self, token_info_func, scope_validate_func, required_scopes):
@@ -182,7 +187,7 @@ def verify_oauth(self, token_info_func, scope_validate_func, required_scopes):
 
         def wrapper(request):
             auth_type, token = self.get_auth_header_value(request)
-            if auth_type != 'bearer':
+            if auth_type != "bearer":
                 return self.no_value
 
             return check_oauth_func(request, token, required_scopes=required_scopes)
@@ -194,13 +199,13 @@ def verify_basic(self, basic_info_func):
 
         def wrapper(request):
             auth_type, user_pass = self.get_auth_header_value(request)
-            if auth_type != 'basic':
+            if auth_type != "basic":
                 return self.no_value
 
             try:
-                username, password = base64.b64decode(user_pass).decode('latin1').split(':', 1)
+                username, password = base64.b64decode(user_pass).decode("latin1").split(":", 1)
             except Exception:
-                raise OAuthProblem(description='Invalid authorization header')
+                raise OAuthProblem(description="Invalid authorization header")
 
             return check_basic_info_func(request, username, password)
 
@@ -208,13 +213,13 @@ def wrapper(request):
 
     @staticmethod
     def get_cookie_value(cookies, name):
-        '''
+        """
         Called inside security wrapper functions
 
         Returns cookie value by its name. None if no such value.
         :param cookies: str: cookies raw data
         :param name: str: cookies key
-        '''
+        """
         cookie_parser = http.cookies.SimpleCookie()
         cookie_parser.load(str(cookies))
         try:
@@ -226,7 +231,6 @@ def verify_api_key(self, api_key_info_func, loc, name):
         check_api_key_func = self.check_api_key(api_key_info_func)
 
         def wrapper(request):
-
             def _immutable_pop(_dict, key):
                 """
                 Pops the key from an immutable dict and returns the value that was popped,
@@ -240,15 +244,15 @@ def _immutable_pop(_dict, key):
                     _dict = dict(_dict.items())
                     return _dict.pop(key), cls(_dict)
 
-            if loc == 'query':
+            if loc == "query":
                 try:
                     api_key, request.query = _immutable_pop(request.query, name)
                 except KeyError:
                     api_key = None
-            elif loc == 'header':
+            elif loc == "header":
                 api_key = request.headers.get(name)
-            elif loc == 'cookie':
-                cookie_list = request.headers.get('Cookie')
+            elif loc == "cookie":
+                cookie_list = request.headers.get("Cookie")
                 api_key = self.get_cookie_value(cookie_list, name)
             else:
                 return self.no_value
@@ -269,7 +273,7 @@ def verify_bearer(self, token_info_func):
 
         def wrapper(request):
             auth_type, token = self.get_auth_header_value(request)
-            if auth_type != 'bearer':
+            if auth_type != "bearer":
                 return self.no_value
             return check_bearer_func(request, token)
 
@@ -333,23 +337,23 @@ def wrapper(request, *args, required_scopes=None):
         return wrapper
 
     def check_bearer_token(self, token_info_func):
-        return self._generic_check(token_info_func, 'Provided token is not valid')
+        return self._generic_check(token_info_func, "Provided token is not valid")
 
     def check_basic_auth(self, basic_info_func):
-        return self._generic_check(basic_info_func, 'Provided authorization is not valid')
+        return self._generic_check(basic_info_func, "Provided authorization is not valid")
 
     def check_api_key(self, api_key_info_func):
-        return self._generic_check(api_key_info_func, 'Provided apikey is not valid')
+        return self._generic_check(api_key_info_func, "Provided apikey is not valid")
 
     def check_oauth_func(self, token_info_func, scope_validate_func):
-        get_token_info = self._generic_check(token_info_func, 'Provided token is not valid')
+        get_token_info = self._generic_check(token_info_func, "Provided token is not valid")
         need_to_add_context, _ = self._need_to_add_context_or_scopes(scope_validate_func)
 
         def wrapper(request, token, required_scopes):
             token_info = get_token_info(request, token, required_scopes=required_scopes)
 
             # Fallback to 'scopes' for backward compatibility
-            token_scopes = token_info.get('scope', token_info.get('scopes', ''))
+            token_scopes = token_info.get("scope", token_info.get("scopes", ""))
 
             kwargs = {}
             if need_to_add_context:
@@ -357,12 +361,13 @@ def wrapper(request, token, required_scopes):
             validation = scope_validate_func(required_scopes, token_scopes, **kwargs)
             if not validation:
                 raise OAuthScopeProblem(
-                    description='Provided token doesn\'t have the required scope',
+                    description="Provided token doesn't have the required scope",
                     required_scopes=required_scopes,
-                    token_scopes=token_scopes
-                    )
+                    token_scopes=token_scopes,
+                )
 
             return token_info
+
         return wrapper
 
     @classmethod
@@ -384,11 +389,11 @@ def wrapper(request):
                     cls._raise_most_specific(errors)
                 else:
                     logger.info("... No auth provided. Aborting with 401.")
-                    raise OAuthProblem(description='No authorization token provided')
+                    raise OAuthProblem(description="No authorization token provided")
 
             # Fallback to 'uid' for backward compatibility
-            request.context['user'] = token_info.get('sub', token_info.get('uid'))
-            request.context['token_info'] = token_info
+            request.context["user"] = token_info.get("sub", token_info.get("uid"))
+            request.context["token_info"] = token_info
             return function(request)
 
         return wrapper
@@ -412,10 +417,7 @@ def _raise_most_specific(exceptions: t.List[Exception]) -> None:
             return
         # We only use status code attributes from exceptions
         # We use 600 as default because 599 is highest valid status code
-        status_to_exc = {
-            getattr(exc, 'code', getattr(exc, 'status', 600)): exc
-            for exc in exceptions
-        }
+        status_to_exc = {getattr(exc, "code", getattr(exc, "status", 600)): exc for exc in exceptions}
         if 403 in status_to_exc:
             raise status_to_exc[403]
         elif 401 in status_to_exc:
diff --git a/firetail/sender.py b/firetail/sender.py
index a94cbd0..32e4964 100644
--- a/firetail/sender.py
+++ b/firetail/sender.py
@@ -23,23 +23,24 @@
 
 
 def backup_logs(logs, logger):
-    timestamp = datetime.now().strftime('%d%m%Y-%H%M%S')
-    logger.info(
-        'Backing up your logs to firetail-failures-%s.txt', timestamp)
-    with open('firetail-failures-{}.txt'.format(timestamp), 'a') as f:
-        f.writelines('\n'.join(logs))
+    timestamp = datetime.now().strftime("%d%m%Y-%H%M%S")
+    logger.info("Backing up your logs to firetail-failures-%s.txt", timestamp)
+    with open("firetail-failures-{}.txt".format(timestamp), "a") as f:
+        f.writelines("\n".join(logs))
 
 
 class FiretailSender:
-    def __init__(self,
-                 token,
-                 url,
-                 logs_drain_timeout=5,
-                 debug=False,
-                 backup_logs=True,
-                 network_timeout=10.0,
-                 number_of_retries=4,
-                 retry_timeout=2):
+    def __init__(
+        self,
+        token,
+        url,
+        logs_drain_timeout=5,
+        debug=False,
+        backup_logs=True,
+        network_timeout=10.0,
+        number_of_retries=4,
+        retry_timeout=2,
+    ):
         self.token = token
         self.url = url
         self.logs_drain_timeout = logs_drain_timeout
@@ -51,8 +52,7 @@ def __init__(self,
         self.retry_timeout = retry_timeout
 
         # Function to see if the main thread is alive
-        self.is_main_thread_active = lambda: any(
-            (i.name == 'MainThread') and i.is_alive() for i in enumerate())
+        self.is_main_thread_active = lambda: any((i.name == "MainThread") and i.is_alive() for i in enumerate())
 
         # Create a queue to hold logs
         self.queue = queue.Queue()
@@ -66,7 +66,7 @@ def __del__(self):
     def _initialize_sending_thread(self):
         self.sending_thread = Thread(target=self._drain_queue)
         self.sending_thread.daemon = False
-        self.sending_thread.name = 'firetail-sending-thread'
+        self.sending_thread.name = "firetail-sending-thread"
         self.sending_thread.start()
 
     def append(self, logs_message):
@@ -86,17 +86,15 @@ def _drain_queue(self):
             # If main is exited, we should run one last time and try to remove
             # all logs
             if not self.is_main_thread_active():
-                self.stdout_logger.debug(
-                    'Identified quit of main thread, sending logs one '
-                    'last time')
+                self.stdout_logger.debug("Identified quit of main thread, sending logs one " "last time")
                 last_try = True
 
             try:
                 self._flush_queue()
             except Exception as e:
                 self.stdout_logger.debug(
-                    'Unexpected exception while draining queue to firetail, '
-                    'swallowing. Exception: %s', e)
+                    "Unexpected exception while draining queue to firetail, " "swallowing. Exception: %s", e
+                )
 
             if not last_try:
                 sleep(self.logs_drain_timeout)
@@ -106,63 +104,61 @@ def _flush_queue(self):
         loger4.info(self.url)
         while not self.queue.empty():
             logs_list = self._get_messages_up_to_max_allowed_size()
-            self.stdout_logger.debug(
-                'Starting to drain %s logs to firetail', len(logs_list))
+            self.stdout_logger.debug("Starting to drain %s logs to firetail", len(logs_list))
 
             # Not configurable from the outside
             sleep_between_retries = self.retry_timeout
             self.number_of_retries = self.number_of_retries
 
             should_backup_to_disk = True
-            headers = {
-                "Content-type": "application/x-ndjson",
-                'x-ft-api-key': self.token
-                }
+            headers = {"Content-type": "application/x-ndjson", "x-ft-api-key": self.token}
 
             for current_try in range(self.number_of_retries):
                 should_retry = False
                 try:
                     response = self.requests_session.post(
-                        self.url, headers=headers, data='\n'.join(logs_list),
-                        timeout=self.network_timeout)
+                        self.url, headers=headers, data="\n".join(logs_list), timeout=self.network_timeout
+                    )
                     # loger4.info(response.text)
                     # self.stdout_logger.info(str(response.status_code))
                     if response.status_code != 200:
                         if response.status_code == 400:
                             self.stdout_logger.debug(
-                                'Got 400 code from firetail. This means that '
-                                'some of your logs are too big, or badly '
-                                'formatted. response: %s', response.text)
+                                "Got 400 code from firetail. This means that "
+                                "some of your logs are too big, or badly "
+                                "formatted. response: %s",
+                                response.text,
+                            )
                             should_backup_to_disk = False
                             should_retry = False
                             break
 
                         if response.status_code == 401:
                             self.stdout_logger.debug(
-                                'You are not authorized with firetail! Token '
-                                'OK? dropping logs...')
+                                "You are not authorized with firetail! Token " "OK? dropping logs..."
+                            )
                             should_backup_to_disk = False
                             break
                         else:
                             self.stdout_logger.debug(
-                                'Got %s while sending logs to firetail, '
-                                'Try (%s/%s). Response: %s',
+                                "Got %s while sending logs to firetail, " "Try (%s/%s). Response: %s",
                                 response.status_code,
                                 current_try + 1,
                                 self.number_of_retries,
-                                response.status_code)
+                                response.status_code,
+                            )
                             should_retry = False
                     else:
-                        self.stdout_logger.debug(
-                            'Successfully sent bulk of %s logs to '
-                            'firetail', len(logs_list))
+                        self.stdout_logger.debug("Successfully sent bulk of %s logs to " "firetail", len(logs_list))
                         should_backup_to_disk = False
                         break
                 except Exception as e:
                     self.stdout_logger.warning(
-                        'Got exception while sending logs to firetail, '
-                        'Try (%s/%s). Message: %s',
-                        current_try + 1, self.number_of_retries, e)
+                        "Got exception while sending logs to firetail, " "Try (%s/%s). Message: %s",
+                        current_try + 1,
+                        self.number_of_retries,
+                        e,
+                    )
                     should_retry = True
 
                 if should_retry:
@@ -171,8 +167,9 @@ def _flush_queue(self):
             if should_backup_to_disk and self.backup_logs:
                 # Write to file
                 self.stdout_logger.error(
-                    'Could not send logs to firetail after %s tries, '
-                    'backing up to local file system', self.number_of_retries)
+                    "Could not send logs to firetail after %s tries, " "backing up to local file system",
+                    self.number_of_retries,
+                )
                 backup_logs(logs_list, self.stdout_logger)
 
             del logs_list
diff --git a/firetail/spec.py b/firetail/spec.py
index d78cbc9..0d3f13b 100644
--- a/firetail/spec.py
+++ b/firetail/spec.py
@@ -31,7 +31,7 @@ def create_spec_validator(spec: dict) -> Draft4Validator:
     """
     # Create an instance validator, which validates defaults against the spec itself instead of
     # against the OpenAPI schema.
-    InstanceValidator = extend_validator(Draft4Validator, {'type': NullableTypeValidator})
+    InstanceValidator = extend_validator(Draft4Validator, {"type": NullableTypeValidator})
     instance_validator = InstanceValidator(spec)
 
     def validate_defaults(validator, properties, instance, schema):
@@ -46,8 +46,8 @@ def validate_defaults(validator, properties, instance, schema):
         # Validate default only when the subschema has validated successfully
         if not valid:
             return
-        if isinstance(instance, dict) and 'default' in instance:
-            for error in instance_validator.iter_errors(instance['default'], instance):
+        if isinstance(instance, dict) and "default" in instance:
+            for error in instance_validator.iter_errors(instance["default"], instance):
                 yield error
 
     SpecValidator = extend_validator(Draft4Validator, {"properties": validate_defaults})
@@ -63,11 +63,10 @@ def canonical_base_path(base_path):
     """
     Make given "basePath" a canonical base URL which can be prepended to paths starting with "/".
     """
-    return base_path.rstrip('/')
+    return base_path.rstrip("/")
 
 
 class Specification(Mapping):
-
     def __init__(self, raw_spec):
         self._raw_spec = copy.deepcopy(raw_spec)
         self._set_defaults(raw_spec)
@@ -77,13 +76,11 @@ def __init__(self, raw_spec):
     @classmethod
     @abc.abstractmethod
     def _set_defaults(cls, spec):
-        """ set some default values in the spec
-        """
+        """set some default values in the spec"""
 
     @classmethod
     def _validate_spec(cls, spec):
-        """ validate spec against schema
-        """
+        """validate spec against schema"""
         try:
             OpenApiValidator = create_spec_validator(spec)
             validator = OpenApiValidator(cls.openapi_schema)
@@ -107,7 +104,7 @@ def version(self):
 
     @property
     def security(self):
-        return self._spec.get('security')
+        return self._spec.get("security")
 
     def __getitem__(self, k):
         return self._spec[k]
@@ -128,12 +125,12 @@ def _load_spec_from_file(arguments, specification):
         """
         arguments = arguments or {}
 
-        with specification.open(mode='rb') as openapi_yaml:
+        with specification.open(mode="rb") as openapi_yaml:
             contents = openapi_yaml.read()
             try:
                 openapi_template = contents.decode()
             except UnicodeDecodeError:
-                openapi_template = contents.decode('utf-8', 'replace')
+                openapi_template = contents.decode("utf-8", "replace")
 
             openapi_string = jinja2.Template(openapi_template).render(**arguments)
             return yaml.safe_load(openapi_string)
@@ -150,7 +147,7 @@ def from_file(cls, spec, arguments=None):
     @staticmethod
     def _get_spec_version(spec):
         try:
-            version_string = spec.get('openapi') or spec.get('swagger')
+            version_string = spec.get("openapi") or spec.get("swagger")
         except AttributeError:
             raise InvalidSpecification(NO_SPEC_VERSION_ERR_MSG)
         if version_string is None:
@@ -158,8 +155,7 @@ def _get_spec_version(spec):
         try:
             version_tuple = tuple(map(int, version_string.split(".")))
         except TypeError:
-            err = ('Unable to convert version string to semantic version tuple: '
-                   '{version_string}.')
+            err = "Unable to convert version string to semantic version tuple: " "{version_string}."
             err = err.format(version_string=version_string)
             raise InvalidSpecification(err)
         return version_tuple
@@ -169,14 +165,11 @@ def from_dict(cls, spec):
         """
         Takes in a dictionary, and returns a Specification
         """
+
         def enforce_string_keys(obj):
             # YAML supports integer keys, but JSON does not
             if isinstance(obj, dict):
-                return {
-                    str(k): enforce_string_keys(v)
-                    for k, v
-                    in obj.items()
-                }
+                return {str(k): enforce_string_keys(v) for k, v in obj.items()}
             return obj
 
         spec = enforce_string_keys(spec)
@@ -203,97 +196,90 @@ def with_base_path(self, base_path):
 class Swagger2Specification(Specification):
     """Python interface for a Swagger 2 specification."""
 
-    yaml_name = 'swagger.yaml'
+    yaml_name = "swagger.yaml"
     operation_cls = Swagger2Operation
 
-    openapi_schema = json.loads(
-        pkgutil.get_data('firetail', 'resources/schemas/v2.0/schema.json')
-    )
+    openapi_schema = json.loads(pkgutil.get_data("firetail", "resources/schemas/v2.0/schema.json"))
 
     @classmethod
     def _set_defaults(cls, spec):
-        spec.setdefault('produces', [])
-        spec.setdefault('consumes', ['application/json'])
-        spec.setdefault('definitions', {})
-        spec.setdefault('parameters', {})
-        spec.setdefault('responses', {})
+        spec.setdefault("produces", [])
+        spec.setdefault("consumes", ["application/json"])
+        spec.setdefault("definitions", {})
+        spec.setdefault("parameters", {})
+        spec.setdefault("responses", {})
 
     @property
     def produces(self):
-        return self._spec['produces']
+        return self._spec["produces"]
 
     @property
     def consumes(self):
-        return self._spec['consumes']
+        return self._spec["consumes"]
 
     @property
     def definitions(self):
-        return self._spec['definitions']
+        return self._spec["definitions"]
 
     @property
     def parameter_definitions(self):
-        return self._spec['parameters']
+        return self._spec["parameters"]
 
     @property
     def response_definitions(self):
-        return self._spec['responses']
+        return self._spec["responses"]
 
     @property
     def security_definitions(self):
-        return self._spec.get('securityDefinitions', {})
+        return self._spec.get("securityDefinitions", {})
 
     @property
     def base_path(self):
-        return canonical_base_path(self._spec.get('basePath', ''))
+        return canonical_base_path(self._spec.get("basePath", ""))
 
     @base_path.setter
     def base_path(self, base_path):
         base_path = canonical_base_path(base_path)
-        self._raw_spec['basePath'] = base_path
-        self._spec['basePath'] = base_path
+        self._raw_spec["basePath"] = base_path
+        self._spec["basePath"] = base_path
 
 
 class OpenAPISpecification(Specification):
     """Python interface for an OpenAPI 3 specification."""
 
-    yaml_name = 'openapi.yaml'
+    yaml_name = "openapi.yaml"
     operation_cls = OpenAPIOperation
 
-    openapi_schema = json.loads(
-        pkgutil.get_data('firetail', 'resources/schemas/v3.0/schema.json')
-    )
+    openapi_schema = json.loads(pkgutil.get_data("firetail", "resources/schemas/v3.0/schema.json"))
 
     @classmethod
     def _set_defaults(cls, spec):
-        spec.setdefault('components', {})
+        spec.setdefault("components", {})
 
     @property
     def security_definitions(self):
-        return self._spec['components'].get('securitySchemes', {})
+        return self._spec["components"].get("securitySchemes", {})
 
     @property
     def components(self):
-        return self._spec['components']
+        return self._spec["components"]
 
     @property
     def base_path(self):
-        servers = self._spec.get('servers', [])
+        servers = self._spec.get("servers", [])
         try:
             # assume we're the first server in list
             server = copy.deepcopy(servers[0])
             server_vars = server.pop("variables", {})
-            server['url'] = server['url'].format(
-                **{k: v['default'] for k, v
-                   in server_vars.items()}
-            )
-            base_path = urlsplit(server['url']).path
+            server["url"] = server["url"].format(**{k: v["default"] for k, v in server_vars.items()})
+            base_path = urlsplit(server["url"]).path
         except IndexError:
-            base_path = ''
+            base_path = ""
         return canonical_base_path(base_path)
 
     @base_path.setter
     def base_path(self, base_path):
         base_path = canonical_base_path(base_path)
-        user_servers = [{'url': base_path}]
-        self._raw_spec['servers'] = user_servers
-        self._spec['servers'] = user_servers
+        user_servers = [{"url": base_path}]
+        self._raw_spec["servers"] = user_servers
+        self._spec["servers"] = user_servers
diff --git a/firetail/utils.py b/firetail/utils.py
index c7c70de..fa49a46 100644
--- a/firetail/utils.py
+++ b/firetail/utils.py
@@ -21,23 +21,25 @@ def boolean(s):
     """
     if isinstance(s, bool):
         return s
-    elif not hasattr(s, 'lower'):
-        raise ValueError('Invalid boolean value')
-    elif s.lower() == 'true':
+    elif not hasattr(s, "lower"):
+        raise ValueError("Invalid boolean value")
+    elif s.lower() == "true":
         return True
-    elif s.lower() == 'false':
+    elif s.lower() == "false":
         return False
     else:
-        raise ValueError('Invalid boolean value')
+        raise ValueError("Invalid boolean value")
 
 
 # https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#data-types
-TYPE_MAP = {'integer': int,
-            'number': float,
-            'string': str,
-            'boolean': boolean,
-            'array': list,
-            'object': dict}  # map of swagger types to python types
+TYPE_MAP = {
+    "integer": int,
+    "number": float,
+    "string": str,
+    "boolean": boolean,
+    "array": list,
+    "object": dict,
+}  # map of swagger types to python types
 
 
 def make_type(value, _type):
@@ -46,8 +48,8 @@ def make_type(value, _type):
 
 
 def deep_merge(a, b):
-    """ merges b into a
-        in case of conflict the value from b is used
+    """merges b into a
+    in case of conflict the value from b is used
     """
     for key in b:
         if key in a:
@@ -68,7 +70,7 @@ def deep_getattr(obj, attr):
     Recurses through an attribute chain to get the ultimate value.
     """
 
-    attrs = attr.split('.')
+    attrs = attr.split(".")
 
     return functools.reduce(getattr, attrs, obj)
 
@@ -102,10 +104,10 @@ def get_function_from_name(function_name):
     if function_name is None:
         raise ValueError("Empty function name")
 
-    if '.' in function_name:
-        module_name, attr_path = function_name.rsplit('.', 1)
+    if "." in function_name:
+        module_name, attr_path = function_name.rsplit(".", 1)
     else:
-        module_name = ''
+        module_name = ""
         attr_path = function_name
 
     module = None
@@ -116,9 +118,9 @@ def get_function_from_name(function_name):
             module = importlib.import_module(module_name)
         except ImportError as import_error:
             last_import_error = import_error
-            if '.' in module_name:
-                module_name, attr_path1 = module_name.rsplit('.', 1)
-                attr_path = f'{attr_path1}.{attr_path}'
+            if "." in module_name:
+                module_name, attr_path1 = module_name.rsplit(".", 1)
+                attr_path = f"{attr_path1}.{attr_path}"
             else:
                 raise
     try:
@@ -136,8 +138,8 @@ def is_json_mimetype(mimetype):
     :type mimetype: str
     :rtype: bool
     """
-    maintype, subtype = mimetype.split('/')  # type: str, str
-    return maintype == 'application' and (subtype == 'json' or subtype.endswith('+json'))
+    maintype, subtype = mimetype.split("/")  # type: str, str
+    return maintype == "application" and (subtype == "json" or subtype.endswith("+json"))
 
 
 def all_json(mimetypes):
@@ -166,14 +168,11 @@ def all_json(mimetypes):
 
 
 def is_nullable(param_def):
-    return (
-        param_def.get('schema', param_def).get('nullable', False) or
-        param_def.get('x-nullable', False)  # swagger2
-    )
+    return param_def.get("schema", param_def).get("nullable", False) or param_def.get("x-nullable", False)  # swagger2
 
 
 def is_null(value):
-    if hasattr(value, 'strip') and value.strip() in ['null', 'None']:
+    if hasattr(value, "strip") and value.strip() in ["null", "None"]:
         return True
 
     if value is None:
@@ -188,9 +187,10 @@ def has_coroutine(function, api=None):
     If ``function`` is a decorator (has a ``__wrapped__`` attribute)
     this function will also look at the wrapped function.
     """
+
     def iscorofunc(func):
         iscorofunc = asyncio.iscoroutinefunction(func)
-        while not iscorofunc and hasattr(func, '__wrapped__'):
+        while not iscorofunc and hasattr(func, "__wrapped__"):
             func = func.__wrapped__
             iscorofunc = asyncio.iscoroutinefunction(func)
         return iscorofunc
@@ -199,11 +199,7 @@ def iscorofunc(func):
         return iscorofunc(function)
 
     else:
-        return any(
-            iscorofunc(func) for func in (
-                function, api.get_request, api.get_response
-            )
-        )
+        return any(iscorofunc(func) for func in (function, api.get_request, api.get_response))
 
 
 def yamldumper(openapi):
@@ -212,16 +208,17 @@ def yamldumper(openapi):
     :param openapi: a spec dictionary.
     :return: a nicely-formatted, serialized yaml spec.
     """
+
     def should_use_block(value):
         char_list = (
-          "\u000a"  # line feed
-          "\u000d"  # carriage return
-          "\u001c"  # file separator
-          "\u001d"  # group separator
-          "\u001e"  # record separator
-          "\u0085"  # next line
-          "\u2028"  # line separator
-          "\u2029"  # paragraph separator
+            "\u000a"  # line feed
+            "\u000d"  # carriage return
+            "\u001c"  # file separator
+            "\u001d"  # group separator
+            "\u001e"  # record separator
+            "\u0085"  # next line
+            "\u2028"  # line separator
+            "\u2029"  # paragraph separator
         )
         for c in char_list:
             if c in value:
@@ -230,7 +227,7 @@ def should_use_block(value):
 
     def my_represent_scalar(self, tag, value, style=None):
         if should_use_block(value):
-            style = '|'
+            style = "|"
         else:
             style = self.default_style
 
@@ -241,7 +238,7 @@ def my_represent_scalar(self, tag, value, style=None):
 
     class NoAnchorDumper(yaml.dumper.SafeDumper):
         """A yaml Dumper that does not replace duplicate entries
-           with yaml anchors.
+        with yaml anchors.
         """
 
         def ignore_aliases(self, *args):
diff --git a/setup.py b/setup.py
index 4305814..ccf8490 100644
--- a/setup.py
+++ b/setup.py
@@ -11,71 +11,61 @@
 
 
 def read_version(package):
-    with open(os.path.join(package, '__init__.py')) as fd:
+    with open(os.path.join(package, "__init__.py")) as fd:
         for line in fd:
-            if line.startswith('__version__ = '):
+            if line.startswith("__version__ = "):
                 return line.split()[-1].strip().strip("'")
 
 
-version = read_version('firetail')
+version = read_version("firetail")
 
 install_requires = [
-    'clickclick>=1.2,<21',
-    'jsonschema>=4.0.1,<5',
-    'PyYAML>=5.1,<7',
-    'PyJWT>=2.3.0',
-    'requests>=2.27,<3',
-    'inflection>=0.3.1,<0.6',
-    'werkzeug>=2.2.1,<3',
-    'starlette>=0.15,<1',
+    "clickclick>=1.2,<21",
+    "jsonschema>=4.0.1,<5",
+    "PyYAML>=5.1,<7",
+    "PyJWT>=2.3.0",
+    "requests>=2.27,<3",
+    "inflection>=0.3.1,<0.6",
+    "werkzeug>=2.2.1,<3",
+    "starlette>=0.15,<1",
 ]
 
-swagger_ui_require = 'swagger-ui-bundle>=0.0.2,<0.1'
+swagger_ui_require = "swagger-ui-bundle>=0.0.2,<0.1"
 
 flask_require = [
-    'flask[async]>=2.2,<3',
-    'a2wsgi>=1.4,<2',
+    "flask[async]>=2.2,<3",
+    "a2wsgi>=1.4,<2",
 ]
 
 aiohttp_require = [
-    'aiohttp>=2.3.10,<4',
-    'aiohttp-jinja2>=0.14.0,<2',
-    'MarkupSafe>=0.23',
+    "aiohttp>=2.3.10,<4",
+    "aiohttp-jinja2>=0.14.0,<2",
+    "MarkupSafe>=0.23",
 ]
 
-tests_require = [
-    'pytest>=6,<7',
-    'pytest-cov>=2,<3',
-    'testfixtures>=6,<7',
-    *flask_require,
-    swagger_ui_require
-]
+tests_require = ["pytest>=6,<7", "pytest-cov>=2,<3", "testfixtures>=6,<7", *flask_require, swagger_ui_require]
 
 tests_require.extend(aiohttp_require)
-tests_require.append('pytest-aiohttp')
-tests_require.append('aiohttp-remotes')
+tests_require.append("pytest-aiohttp")
+tests_require.append("aiohttp-remotes")
 
-docs_require = [
-    'sphinx-autoapi==1.8.1'
-]
+docs_require = ["sphinx-autoapi==1.8.1"]
 
 
 class PyTest(TestCommand):
-
-    user_options = [('cov-html=', None, 'Generate junit html report')]
+    user_options = [("cov-html=", None, "Generate junit html report")]
 
     def initialize_options(self):
         TestCommand.initialize_options(self)
         self.cov = None
-        self.pytest_args = ['--cov', 'firetail',
-                            '--cov-report', 'term-missing', '-v']
+        self.pytest_args = ["--cov", "firetail", "--cov-report", "term-missing", "-v"]
         self.cov_html = False
 
     def finalize_options(self):
         TestCommand.finalize_options(self)
         if self.cov_html:
-            self.pytest_args.extend(['--cov-report', 'html'])
-        self.pytest_args.extend(['tests'])
+            self.pytest_args.extend(["--cov-report", "html"])
+        self.pytest_args.extend(["tests"])
 
     def run_tests(self):
         import pytest
@@ -86,47 +76,47 @@ def run_tests(self):
 
 def readme():
     try:
-        return open('README.rst', encoding='utf-8').read()
+        return open("README.rst", encoding="utf-8").read()
     except TypeError:
-        return open('README.rst').read()
+        return open("README.rst").read()
 
 
 setup(
-    name='firetail',
+    name="firetail",
     packages=find_packages(),
     version=version,
-    description='Firetail - API first applications with OpenAPI/Swagger and Flask',
+    description="Firetail - API first applications with OpenAPI/Swagger and Flask",
     long_description=readme(),
     # long_description_content_type="text/x-rst",
-    author='FireTail International (TM)',
-    url='https://github.com/FireTail-io/firetail-py-lib',
-    keywords='openapi oai swagger rest api oauth flask microservice framework',
-    license='LGPLv3',
+    author="FireTail International (TM)",
+    url="https://github.com/FireTail-io/firetail-py-lib",
+    keywords="openapi oai swagger rest api oauth flask microservice framework",
+    license="LGPLv3",
     # setup_requires=['flake8'],
     python_requires=">=3.6",
     install_requires=install_requires + flask_require,
     tests_require=tests_require,
     extras_require={
-        'tests': tests_require,
-        'flask': flask_require,
-        'swagger-ui': swagger_ui_require,
-        'docs': docs_require
+        "tests": tests_require,
+        "flask": flask_require,
+        "swagger-ui": swagger_ui_require,
+        "docs": docs_require,
     },
-    cmdclass={'test': PyTest},
-    test_suite='tests',
+    cmdclass={"test": PyTest},
+    test_suite="tests",
     classifiers=[
-        'Programming Language :: Python',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        'Programming Language :: Python :: 3.10',
-        'Development Status :: 5 - Production/Stable',
-        'Intended Audience :: Developers',
-        'Operating System :: OS Independent',
-        'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
-        'Topic :: Software Development :: Libraries :: Application Frameworks'
+        "Programming Language :: Python",
+        "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
+        "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
+        "Development Status :: 5 - Production/Stable",
+        "Intended Audience :: Developers",
+        "Operating System :: OS Independent",
+        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
+        "Topic :: Software Development :: Libraries :: Application Frameworks",
     ],
     # needed to include swagger-ui (see MANIFEST.in)
     include_package_data=True,
-    entry_points={'console_scripts': ['Firetail = Firetail.cli:main']}
+    entry_points={"console_scripts": ["Firetail = Firetail.cli:main"]},
 )


Test patch:
diff --git a/tests/aiohttp/test_aiohttp_api_secure.py b/tests/aiohttp/test_aiohttp_api_secure.py
index db0075e..cc1fe3a 100644
--- a/tests/aiohttp/test_aiohttp_api_secure.py
+++ b/tests/aiohttp/test_aiohttp_api_secure.py
@@ -28,7 +28,7 @@ async def fake_get(url, params=None, headers=None, timeout=None):
         """
         headers = headers or {}
         assert url == "https://oauth.example/token_info"
-        token = headers.get('Authorization', 'invalid').split()[-1]
+        token = headers.get("Authorization", "invalid").split()[-1]
         if token in ["100", "has_myscope"]:
             return FakeAioHttpClientResponse(200, {"uid": "test-user", "scope": ["myscope"]})
         elif token in ["200", "has_wrongscope"]:
@@ -40,36 +40,31 @@ async def fake_get(url, params=None, headers=None, timeout=None):
         elif token == "has_scopes_in_scopes_with_s":
             return FakeAioHttpClientResponse(200, {"uid": "test-user", "scopes": ["myscope", "otherscope"]})
         else:
-            raise AssertionError('Not supported test token ' + token)
+            raise AssertionError("Not supported test token " + token)
 
     client_instance = MagicMock()
     client_instance.get = fake_get
-    monkeypatch.setattr('aiohttp.ClientSession', MagicMock(return_value=client_instance))
+    monkeypatch.setattr("aiohttp.ClientSession", MagicMock(return_value=client_instance))
 
 
 async def test_auth_all_paths(oauth_aiohttp_client, aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True, auth_all_paths=True)
-    app.add_api('swagger_secure.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True, auth_all_paths=True)
+    app.add_api("swagger_secure.yaml")
 
     app_client = await aiohttp_client(app.app)
 
     get_inexistent_endpoint = await app_client.get(
-        '/v1.0/does-not-exist-valid-token',
-        headers={'Authorization': 'Bearer 100'}
+        "/v1.0/does-not-exist-valid-token", headers={"Authorization": "Bearer 100"}
     )
     assert get_inexistent_endpoint.status == 404
-    assert get_inexistent_endpoint.content_type == 'application/problem+json'
+    assert get_inexistent_endpoint.content_type == "application/problem+json"
 
-    get_inexistent_endpoint = await app_client.get(
-        '/v1.0/does-not-exist-no-token'
-    )
+    get_inexistent_endpoint = await app_client.get("/v1.0/does-not-exist-no-token")
     assert get_inexistent_endpoint.status == 401
-    assert get_inexistent_endpoint.content_type == 'application/problem+json'
+    assert get_inexistent_endpoint.content_type == "application/problem+json"
 
 
-@pytest.mark.parametrize('spec', ['swagger_secure.yaml', 'openapi_secure.yaml'])
+@pytest.mark.parametrize("spec", ["swagger_secure.yaml", "openapi_secure.yaml"])
 async def test_secure_app(oauth_aiohttp_client, aiohttp_api_spec_dir, aiohttp_client, spec):
     """
     Test common authentication method between Swagger 2 and OpenApi 3
@@ -78,33 +73,33 @@ async def test_secure_app(oauth_aiohttp_client, aiohttp_api_spec_dir, aiohttp_cl
     app.add_api(spec)
     app_client = await aiohttp_client(app.app)
 
-    response = await app_client.get('/v1.0/all_auth')
+    response = await app_client.get("/v1.0/all_auth")
     assert response.status == 401
-    assert response.content_type == 'application/problem+json'
+    assert response.content_type == "application/problem+json"
 
-    response = await app_client.get('/v1.0/all_auth', headers={'Authorization': 'Bearer 100'})
+    response = await app_client.get("/v1.0/all_auth", headers={"Authorization": "Bearer 100"})
     assert response.status == 200
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
-    response = await app_client.get('/v1.0/all_auth', headers={'authorization': 'Bearer 100'})
+    response = await app_client.get("/v1.0/all_auth", headers={"authorization": "Bearer 100"})
     assert response.status == 200, "Authorization header in lower case should be accepted"
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
-    response = await app_client.get('/v1.0/all_auth', headers={'AUTHORIZATION': 'Bearer 100'})
+    response = await app_client.get("/v1.0/all_auth", headers={"AUTHORIZATION": "Bearer 100"})
     assert response.status == 200, "Authorization header in upper case should be accepted"
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
-    basic_header = 'Basic ' + base64.b64encode(b'username:username').decode('ascii')
-    response = await app_client.get('/v1.0/all_auth', headers={'Authorization': basic_header})
+    basic_header = "Basic " + base64.b64encode(b"username:username").decode("ascii")
+    response = await app_client.get("/v1.0/all_auth", headers={"Authorization": basic_header})
     assert response.status == 200
-    assert (await response.json()) == {"uid": 'username'}
+    assert (await response.json()) == {"uid": "username"}
 
-    basic_header = 'Basic ' + base64.b64encode(b'username:wrong').decode('ascii')
-    response = await app_client.get('/v1.0/all_auth', headers={'Authorization': basic_header})
+    basic_header = "Basic " + base64.b64encode(b"username:wrong").decode("ascii")
+    response = await app_client.get("/v1.0/all_auth", headers={"Authorization": basic_header})
     assert response.status == 401, "Wrong password should trigger unauthorized"
-    assert response.content_type == 'application/problem+json'
+    assert response.content_type == "application/problem+json"
 
-    response = await app_client.get('/v1.0/all_auth', headers={'X-API-Key': '{"foo": "bar"}'})
+    response = await app_client.get("/v1.0/all_auth", headers={"X-API-Key": '{"foo": "bar"}'})
     assert response.status == 200
     assert (await response.json()) == {"foo": "bar"}
 
@@ -114,62 +109,60 @@ async def test_bearer_secure(aiohttp_api_spec_dir, aiohttp_client):
     Test authentication method specific to OpenApi 3
     """
     app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
-    app.add_api('openapi_secure.yaml')
+    app.add_api("openapi_secure.yaml")
     app_client = await aiohttp_client(app.app)
 
     bearer_header = 'Bearer {"scope": ["myscope"], "uid": "test-user"}'
-    response = await app_client.get('/v1.0/bearer_auth', headers={'Authorization': bearer_header})
+    response = await app_client.get("/v1.0/bearer_auth", headers={"Authorization": bearer_header})
     assert response.status == 200
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
 
 async def test_async_secure(aiohttp_api_spec_dir, aiohttp_client):
     app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
-    app.add_api('openapi_secure.yaml', pass_context_arg_name='request')
+    app.add_api("openapi_secure.yaml", pass_context_arg_name="request")
     app_client = await aiohttp_client(app.app)
 
-    response = await app_client.get('/v1.0/async_auth')
+    response = await app_client.get("/v1.0/async_auth")
     assert response.status == 401
-    assert response.content_type == 'application/problem+json'
+    assert response.content_type == "application/problem+json"
 
     bearer_header = 'Bearer {"scope": ["myscope"], "uid": "test-user"}'
-    response = await app_client.get('/v1.0/async_auth', headers={'Authorization': bearer_header})
+    response = await app_client.get("/v1.0/async_auth", headers={"Authorization": bearer_header})
     assert response.status == 200
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
     bearer_header = 'Bearer {"scope": ["myscope", "other_scope"], "uid": "test-user"}'
-    response = await app_client.get('/v1.0/async_auth', headers={'Authorization': bearer_header})
+    response = await app_client.get("/v1.0/async_auth", headers={"Authorization": bearer_header})
     assert response.status == 403, "async_scope_validation should deny access if scopes are not strictly the same"
 
-    basic_header = 'Basic ' + base64.b64encode(b'username:username').decode('ascii')
-    response = await app_client.get('/v1.0/async_auth', headers={'Authorization': basic_header})
+    basic_header = "Basic " + base64.b64encode(b"username:username").decode("ascii")
+    response = await app_client.get("/v1.0/async_auth", headers={"Authorization": basic_header})
     assert response.status == 200
-    assert (await response.json()) == {"uid": 'username'}
+    assert (await response.json()) == {"uid": "username"}
 
-    basic_header = 'Basic ' + base64.b64encode(b'username:wrong').decode('ascii')
-    response = await app_client.get('/v1.0/async_auth', headers={'Authorization': basic_header})
+    basic_header = "Basic " + base64.b64encode(b"username:wrong").decode("ascii")
+    response = await app_client.get("/v1.0/async_auth", headers={"Authorization": basic_header})
     assert response.status == 401, "Wrong password should trigger unauthorized"
-    assert response.content_type == 'application/problem+json'
+    assert response.content_type == "application/problem+json"
 
-    response = await app_client.get('/v1.0/all_auth', headers={'X-API-Key': '{"foo": "bar"}'})
+    response = await app_client.get("/v1.0/all_auth", headers={"X-API-Key": '{"foo": "bar"}'})
     assert response.status == 200
     assert (await response.json()) == {"foo": "bar"}
 
     bearer_header = 'Bearer {"scope": ["myscope"], "uid": "test-user"}'
-    response = await app_client.get('/v1.0/async_bearer_auth', headers={'Authorization': bearer_header})
+    response = await app_client.get("/v1.0/async_bearer_auth", headers={"Authorization": bearer_header})
     assert response.status == 200
-    assert (await response.json()) == {"scope": ['myscope'], "uid": 'test-user'}
+    assert (await response.json()) == {"scope": ["myscope"], "uid": "test-user"}
 
-@pytest.mark.parametrize('spec', ['swagger_secure.yaml', 'openapi_secure.yaml'])
+
+@pytest.mark.parametrize("spec", ["swagger_secure.yaml", "openapi_secure.yaml"])
 async def test_auth_exception_swagger(oauth_aiohttp_client, aiohttp_api_spec_dir, aiohttp_client, spec):
     app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     app.add_api(spec)
 
     app_client = await aiohttp_client(app.app)
 
-    response = await app_client.get(
-        '/v1.0/fail_auth',
-        headers={'X-API-Key-2': 'foo'}
-    )
+    response = await app_client.get("/v1.0/fail_auth", headers={"X-API-Key-2": "foo"})
     assert response.status == 401
-    assert response.content_type == 'application/problem+json'
+    assert response.content_type == "application/problem+json"
diff --git a/tests/aiohttp/test_aiohttp_app.py b/tests/aiohttp/test_aiohttp_app.py
index bcfa4a6..20e0a40 100644
--- a/tests/aiohttp/test_aiohttp_app.py
+++ b/tests/aiohttp/test_aiohttp_app.py
@@ -12,148 +12,112 @@
 @pytest.fixture
 def web_run_app_mock(monkeypatch):
     mock_ = mock.MagicMock()
-    monkeypatch.setattr('firetail.apps.aiohttp_app.web.run_app', mock_)
+    monkeypatch.setattr("firetail.apps.aiohttp_app.web.run_app", mock_)
     return mock_
 
 
 @pytest.fixture
 def sys_modules_mock(monkeypatch):
-    monkeypatch.setattr('firetail.apps.aiohttp_app.sys.modules', {})
+    monkeypatch.setattr("firetail.apps.aiohttp_app.sys.modules", {})
 
 
 def test_app_run(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     app.run(use_default_access_log=True)
-    logger = logging.getLogger('firetail.aiohttp_app')
-    assert web_run_app_mock.call_args_list == [
-        mock.call(app.app, port=5001, host='0.0.0.0', access_log=logger)
-    ]
+    logger = logging.getLogger("firetail.aiohttp_app")
+    assert web_run_app_mock.call_args_list == [mock.call(app.app, port=5001, host="0.0.0.0", access_log=logger)]
 
 
 def test_app_run_new_port(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     app.run(port=5002)
-    assert web_run_app_mock.call_args_list == [
-        mock.call(app.app, port=5002, host='0.0.0.0', access_log=None)
-    ]
+    assert web_run_app_mock.call_args_list == [mock.call(app.app, port=5002, host="0.0.0.0", access_log=None)]
 
 
 def test_app_run_default_port(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, specification_dir=aiohttp_api_spec_dir, debug=True)
     app.run()
-    assert web_run_app_mock.call_args_list == [
-        mock.call(app.app, port=5000, host='0.0.0.0', access_log=None)
-    ]
+    assert web_run_app_mock.call_args_list == [mock.call(app.app, port=5000, host="0.0.0.0", access_log=None)]
 
 
 def test_app_run_debug(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir)
+    app.add_api("swagger_simple.yaml")
     app.run(debug=True)
-    assert web_run_app_mock.call_args_list == [
-        mock.call(app.app, port=5001, host='0.0.0.0', access_log=None)
-    ]
+    assert web_run_app_mock.call_args_list == [mock.call(app.app, port=5001, host="0.0.0.0", access_log=None)]
 
 
 def test_app_run_access_log(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    logger = logging.getLogger('firetail.aiohttp_app')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    logger = logging.getLogger("firetail.aiohttp_app")
     app.run(access_log=logger)
-    assert web_run_app_mock.call_args_list == [
-        mock.call(app.app, port=5001, host='0.0.0.0', access_log=logger)
-    ]
+    assert web_run_app_mock.call_args_list == [mock.call(app.app, port=5001, host="0.0.0.0", access_log=logger)]
 
 
 def test_app_run_server_error(web_run_app_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir)
 
     with pytest.raises(Exception) as exc_info:
-        app.run(server='other')
+        app.run(server="other")
 
-    assert exc_info.value.args == ('Server other not recognized',)
+    assert exc_info.value.args == ("Server other not recognized",)
 
 
 def test_app_get_root_path_return_Path(aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir)
     assert isinstance(app.get_root_path(), pathlib.Path) == True
 
 
 def test_app_get_root_path_exists(aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir)
     assert app.get_root_path().exists() == True
 
 
 def test_app_get_root_path(aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir)
     root_path = app.get_root_path()
-    assert str(root_path).endswith(os.path.join('tests', 'aiohttp')) == True
+    assert str(root_path).endswith(os.path.join("tests", "aiohttp")) == True
 
 
 def test_app_get_root_path_not_in_sys_modules(sys_modules_mock, aiohttp_api_spec_dir):
-    app = AioHttpApp('firetail', port=5001,
-                     specification_dir=aiohttp_api_spec_dir)
+    app = AioHttpApp("firetail", port=5001, specification_dir=aiohttp_api_spec_dir)
     root_path = app.get_root_path()
-    assert str(root_path).endswith(os.sep + 'firetail') == True
+    assert str(root_path).endswith(os.sep + "firetail") == True
 
 
 def test_app_get_root_path_invalid(sys_modules_mock, aiohttp_api_spec_dir):
     with pytest.raises(RuntimeError) as exc_info:
-        AioHttpApp('error__', port=5001,
-                   specification_dir=aiohttp_api_spec_dir)
+        AioHttpApp("error__", port=5001, specification_dir=aiohttp_api_spec_dir)
 
     assert exc_info.value.args == ("Invalid import name 'error__'",)
 
 
 def test_app_with_empty_base_path_error(aiohttp_api_spec_dir):
-    spec_dir = '..' / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=spec_dir,
-                     debug=True)
+    spec_dir = ".." / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
+    app = AioHttpApp(__name__, port=5001, specification_dir=spec_dir, debug=True)
     with pytest.raises(FiretailException) as exc_info:
-        app.add_api('swagger_empty_base_path.yaml')
+        app.add_api("swagger_empty_base_path.yaml")
 
     assert exc_info.value.args == (
-        "aiohttp doesn't allow to set empty base_path ('/'), "
-        "use non-empty instead, e.g /api",
+        "aiohttp doesn't allow to set empty base_path ('/'), " "use non-empty instead, e.g /api",
     )
 
 
 def test_app_with_empty_base_path_and_only_one_api(aiohttp_api_spec_dir):
-    spec_dir = '..' / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=spec_dir,
-                     debug=True,
-                     only_one_api=True)
-    api = app.add_api('swagger_empty_base_path.yaml')
+    spec_dir = ".." / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
+    app = AioHttpApp(__name__, port=5001, specification_dir=spec_dir, debug=True, only_one_api=True)
+    api = app.add_api("swagger_empty_base_path.yaml")
     assert api is app.app
 
 
 def test_app_add_two_apis_error_with_only_one_api(aiohttp_api_spec_dir):
-    spec_dir = '..' / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=spec_dir,
-                     debug=True,
-                     only_one_api=True)
-    app.add_api('swagger_empty_base_path.yaml')
+    spec_dir = ".." / aiohttp_api_spec_dir.relative_to(TEST_FOLDER)
+    app = AioHttpApp(__name__, port=5001, specification_dir=spec_dir, debug=True, only_one_api=True)
+    app.add_api("swagger_empty_base_path.yaml")
 
     with pytest.raises(FiretailException) as exc_info:
-        app.add_api('swagger_empty_base_path.yaml')
+        app.add_api("swagger_empty_base_path.yaml")
 
     assert exc_info.value.args == (
-        "an api was already added, "
-        "create a new app with 'only_one_api=False' "
-        "to add more than one api",
+        "an api was already added, " "create a new app with 'only_one_api=False' " "to add more than one api",
     )
diff --git a/tests/aiohttp/test_aiohttp_datetime.py b/tests/aiohttp/test_aiohttp_datetime.py
index 1450875..e451ed1 100644
--- a/tests/aiohttp/test_aiohttp_datetime.py
+++ b/tests/aiohttp/test_aiohttp_datetime.py
@@ -7,43 +7,38 @@
 
 
 async def test_swagger_json(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger.json file is returned for default setting passed to app. """
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('datetime_support.yaml')
+    """Verify the swagger.json file is returned for default setting passed to app."""
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("datetime_support.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_json = await app_client.get('/v1.0/openapi.json')
+    swagger_json = await app_client.get("/v1.0/openapi.json")
     spec_data = await swagger_json.json()
 
     def get_value(data, path):
-        for part in path.split('.'):
+        for part in path.split("."):
             data = data.get(part)
             assert data, f"No data in part '{part}' of '{path}'"
         return data
 
-    example = get_value(spec_data, 'paths./datetime.get.responses.200.content.application/json.schema.example.value')
-    assert example in [
-        '2000-01-23T04:56:07.000008+00:00',  # PyYAML 5.3
-        '2000-01-23T04:56:07.000008Z'
-    ]
-    example = get_value(spec_data, 'paths./date.get.responses.200.content.application/json.schema.example.value')
-    assert example == '2000-01-23'
-    example = get_value(spec_data, 'paths./uuid.get.responses.200.content.application/json.schema.example.value')
-    assert example == 'a7b8869c-5f24-4ce0-a5d1-3e44c3663aa9'
-
-    resp = await app_client.get('/v1.0/datetime')
+    example = get_value(spec_data, "paths./datetime.get.responses.200.content.application/json.schema.example.value")
+    assert example in ["2000-01-23T04:56:07.000008+00:00", "2000-01-23T04:56:07.000008Z"]  # PyYAML 5.3
+    example = get_value(spec_data, "paths./date.get.responses.200.content.application/json.schema.example.value")
+    assert example == "2000-01-23"
+    example = get_value(spec_data, "paths./uuid.get.responses.200.content.application/json.schema.example.value")
+    assert example == "a7b8869c-5f24-4ce0-a5d1-3e44c3663aa9"
+
+    resp = await app_client.get("/v1.0/datetime")
     assert resp.status == 200
     json_data = await resp.json()
-    assert json_data == {'value': '2000-01-02T03:04:05.000006Z'}
+    assert json_data == {"value": "2000-01-02T03:04:05.000006Z"}
 
-    resp = await app_client.get('/v1.0/date')
+    resp = await app_client.get("/v1.0/date")
     assert resp.status == 200
     json_data = await resp.json()
-    assert json_data == {'value': '2000-01-02'}
+    assert json_data == {"value": "2000-01-02"}
 
-    resp = await app_client.get('/v1.0/uuid')
+    resp = await app_client.get("/v1.0/uuid")
     assert resp.status == 200
     json_data = await resp.json()
-    assert json_data == {'value': 'e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51'}
+    assert json_data == {"value": "e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51"}
diff --git a/tests/aiohttp/test_aiohttp_errors.py b/tests/aiohttp/test_aiohttp_errors.py
index 561003f..4f279d6 100644
--- a/tests/aiohttp/test_aiohttp_errors.py
+++ b/tests/aiohttp/test_aiohttp_errors.py
@@ -12,11 +12,9 @@ def is_valid_problem_json(json_body):
 
 @pytest.fixture
 def aiohttp_app(problem_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=problem_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=problem_api_spec_dir, debug=True)
     options = {"validate_responses": True}
-    app.add_api('openapi.yaml', validate_responses=True, pass_context_arg_name='request_ctx', options=options)
+    app.add_api("openapi.yaml", validate_responses=True, pass_context_arg_name="request_ctx", options=options)
     return app
 
 
@@ -25,16 +23,16 @@ async def test_aiohttp_problems_404(aiohttp_app, aiohttp_client):
     #       so that it is parameterized for all web frameworks.
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
-    greeting404 = await app_client.get('/v1.0/greeting')  # type: aiohttp.ClientResponse
-    assert greeting404.content_type == 'application/problem+json'
+    greeting404 = await app_client.get("/v1.0/greeting")  # type: aiohttp.ClientResponse
+    assert greeting404.content_type == "application/problem+json"
     assert greeting404.status == 404
     error404 = await greeting404.json()
     assert is_valid_problem_json(error404)
-    assert error404['type'] == 'about:blank'
-    assert error404['title'] == 'Not Found'
-    assert error404['detail'] == HTTPStatus(404).description
-    assert error404['status'] == 404
-    assert 'instance' not in error404
+    assert error404["type"] == "about:blank"
+    assert error404["title"] == "Not Found"
+    assert error404["detail"] == HTTPStatus(404).description
+    assert error404["status"] == 404
+    assert "instance" not in error404
 
 
 async def test_aiohttp_problems_405(aiohttp_app, aiohttp_client):
@@ -42,16 +40,16 @@ async def test_aiohttp_problems_405(aiohttp_app, aiohttp_client):
     #       so that it is parameterized for all web frameworks.
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
-    get_greeting = await app_client.get('/v1.0/greeting/jsantos')  # type: aiohttp.ClientResponse
-    assert get_greeting.content_type == 'application/problem+json'
+    get_greeting = await app_client.get("/v1.0/greeting/jsantos")  # type: aiohttp.ClientResponse
+    assert get_greeting.content_type == "application/problem+json"
     assert get_greeting.status == 405
     error405 = await get_greeting.json()
     assert is_valid_problem_json(error405)
-    assert error405['type'] == 'about:blank'
-    assert error405['title'] == 'Method Not Allowed'
-    assert error405['detail'] == HTTPStatus(405).description
-    assert error405['status'] == 405
-    assert 'instance' not in error405
+    assert error405["type"] == "about:blank"
+    assert error405["title"] == "Method Not Allowed"
+    assert error405["detail"] == HTTPStatus(405).description
+    assert error405["status"] == 405
+    assert "instance" not in error405
 
 
 async def test_aiohttp_problems_500(aiohttp_app, aiohttp_client):
@@ -59,16 +57,16 @@ async def test_aiohttp_problems_500(aiohttp_app, aiohttp_client):
     #       so that it is parameterized for all web frameworks.
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
-    get500 = await app_client.get('/v1.0/except')  # type: aiohttp.ClientResponse
-    assert get500.content_type == 'application/problem+json'
+    get500 = await app_client.get("/v1.0/except")  # type: aiohttp.ClientResponse
+    assert get500.content_type == "application/problem+json"
     assert get500.status == 500
     error500 = await get500.json()
     assert is_valid_problem_json(error500)
-    assert error500['type'] == 'about:blank'
-    assert error500['title'] == 'Internal Server Error'
-    assert error500['detail'] == HTTPStatus(500).description
-    assert error500['status'] == 500
-    assert 'instance' not in error500
+    assert error500["type"] == "about:blank"
+    assert error500["title"] == "Internal Server Error"
+    assert error500["detail"] == HTTPStatus(500).description
+    assert error500["status"] == 500
+    assert "instance" not in error500
 
 
 async def test_aiohttp_problems_418(aiohttp_app, aiohttp_client):
@@ -76,17 +74,17 @@ async def test_aiohttp_problems_418(aiohttp_app, aiohttp_client):
     #       so that it is parameterized for all web frameworks.
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
-    get_problem = await app_client.get('/v1.0/problem')  # type: aiohttp.ClientResponse
-    assert get_problem.content_type == 'application/problem+json'
+    get_problem = await app_client.get("/v1.0/problem")  # type: aiohttp.ClientResponse
+    assert get_problem.content_type == "application/problem+json"
     assert get_problem.status == 418
-    assert get_problem.headers['x-Test-Header'] == 'In Test'
+    assert get_problem.headers["x-Test-Header"] == "In Test"
     error_problem = await get_problem.json()
     assert is_valid_problem_json(error_problem)
-    assert error_problem['type'] == 'http://www.example.com/error'
-    assert error_problem['title'] == 'Some Error'
-    assert error_problem['detail'] == 'Something went wrong somewhere'
-    assert error_problem['status'] == 418
-    assert error_problem['instance'] == 'instance1'
+    assert error_problem["type"] == "http://www.example.com/error"
+    assert error_problem["title"] == "Some Error"
+    assert error_problem["detail"] == "Something went wrong somewhere"
+    assert error_problem["status"] == 418
+    assert error_problem["instance"] == "instance1"
 
 
 async def test_aiohttp_problems_misc(aiohttp_app, aiohttp_client):
@@ -95,42 +93,46 @@ async def test_aiohttp_problems_misc(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
     problematic_json = await app_client.get(
-        '/v1.0/json_response_with_undefined_value_to_serialize')  # type: aiohttp.ClientResponse
-    assert problematic_json.content_type == 'application/problem+json'
+        "/v1.0/json_response_with_undefined_value_to_serialize"
+    )  # type: aiohttp.ClientResponse
+    assert problematic_json.content_type == "application/problem+json"
     assert problematic_json.status == 500
     problematic_json_body = await problematic_json.json()
     assert is_valid_problem_json(problematic_json_body)
 
-    custom_problem = await app_client.get('/v1.0/customized_problem_response')  # type: aiohttp.ClientResponse
-    assert custom_problem.content_type == 'application/problem+json'
+    custom_problem = await app_client.get("/v1.0/customized_problem_response")  # type: aiohttp.ClientResponse
+    assert custom_problem.content_type == "application/problem+json"
     assert custom_problem.status == 403
     problem_body = await custom_problem.json()
     assert is_valid_problem_json(problem_body)
-    assert 'amount' in problem_body
+    assert "amount" in problem_body
 
-    problem_as_exception = await app_client.get('/v1.0/problem_exception_with_extra_args')  # type: aiohttp.ClientResponse
+    problem_as_exception = await app_client.get(
+        "/v1.0/problem_exception_with_extra_args"
+    )  # type: aiohttp.ClientResponse
     assert problem_as_exception.content_type == "application/problem+json"
     assert problem_as_exception.status == 400
     problem_as_exception_body = await problem_as_exception.json()
     assert is_valid_problem_json(problem_as_exception_body)
-    assert 'age' in problem_as_exception_body
-    assert problem_as_exception_body['age'] == 30
+    assert "age" in problem_as_exception_body
+    assert problem_as_exception_body["age"] == 30
 
 
-@pytest.mark.skip(reason="aiohttp_api.get_firetail_response uses _cast_body "
-                         "to stringify the dict directly instead of using json.dumps. "
-                         "This differs from flask usage, where there is no _cast_body.")
+@pytest.mark.skip(
+    reason="aiohttp_api.get_firetail_response uses _cast_body "
+    "to stringify the dict directly instead of using json.dumps. "
+    "This differs from flask usage, where there is no _cast_body."
+)
 async def test_aiohttp_problem_with_text_content_type(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)  # type: aiohttp.test_utils.TestClient
 
-    get_problem2 = await app_client.get('/v1.0/other_problem')  # type: aiohttp.ClientResponse
-    assert get_problem2.content_type == 'application/problem+json'
+    get_problem2 = await app_client.get("/v1.0/other_problem")  # type: aiohttp.ClientResponse
+    assert get_problem2.content_type == "application/problem+json"
     assert get_problem2.status == 418
     error_problem2 = await get_problem2.json()
     assert is_valid_problem_json(error_problem2)
-    assert error_problem2['type'] == 'about:blank'
-    assert error_problem2['title'] == 'Some Error'
-    assert error_problem2['detail'] == 'Something went wrong somewhere'
-    assert error_problem2['status'] == 418
-    assert error_problem2['instance'] == 'instance1'
-
+    assert error_problem2["type"] == "about:blank"
+    assert error_problem2["title"] == "Some Error"
+    assert error_problem2["detail"] == "Something went wrong somewhere"
+    assert error_problem2["status"] == 418
+    assert error_problem2["instance"] == "instance1"
diff --git a/tests/aiohttp/test_aiohttp_multipart.py b/tests/aiohttp/test_aiohttp_multipart.py
index 89429a7..3a33bad 100644
--- a/tests/aiohttp/test_aiohttp_multipart.py
+++ b/tests/aiohttp/test_aiohttp_multipart.py
@@ -13,15 +13,13 @@
 
 @pytest.fixture
 def aiohttp_app(aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     app.add_api(
-        'openapi_multipart.yaml',
+        "openapi_multipart.yaml",
         validate_responses=True,
         strict_validation=True,
         pythonic_params=True,
-        pass_context_arg_name='request_ctx',
+        pass_context_arg_name="request_ctx",
     )
     return app
 
@@ -30,14 +28,14 @@ async def test_single_file_upload(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)
 
     resp = await app_client.post(
-        '/v1.0/upload_file',
-        data=aiohttp.FormData(fields=[('myfile', open(__file__, 'rb'))])(),
+        "/v1.0/upload_file",
+        data=aiohttp.FormData(fields=[("myfile", open(__file__, "rb"))])(),
     )
 
     data = await resp.json()
     assert resp.status == 200
-    assert data['fileName'] == f'{__name__}.py'
-    assert data['myfile_content'] == Path(__file__).read_bytes().decode('utf8')
+    assert data["fileName"] == f"{__name__}.py"
+    assert data["myfile_content"] == Path(__file__).read_bytes().decode("utf8")
 
 
 async def test_many_files_upload(aiohttp_app, aiohttp_client):
@@ -45,24 +43,26 @@ async def test_many_files_upload(aiohttp_app, aiohttp_client):
 
     dir_name = os.path.dirname(__file__)
     files_field = [
-        ('myfiles', open(f'{dir_name}/{file_name}', 'rb')) \
-            for file_name in sorted(os.listdir(dir_name)) if file_name.endswith('.py')
+        ("myfiles", open(f"{dir_name}/{file_name}", "rb"))
+        for file_name in sorted(os.listdir(dir_name))
+        if file_name.endswith(".py")
     ]
 
     form_data = aiohttp.FormData(fields=files_field)
 
     resp = await app_client.post(
-        '/v1.0/upload_files',
+        "/v1.0/upload_files",
         data=form_data(),
     )
 
     data = await resp.json()
 
     assert resp.status == 200
-    assert data['files_count'] == len(files_field)
-    assert data['myfiles_content'] == [
-        Path(f'{dir_name}/{file_name}').read_bytes().decode('utf8') \
-            for file_name in sorted(os.listdir(dir_name)) if file_name.endswith('.py')
+    assert data["files_count"] == len(files_field)
+    assert data["myfiles_content"] == [
+        Path(f"{dir_name}/{file_name}").read_bytes().decode("utf8")
+        for file_name in sorted(os.listdir(dir_name))
+        if file_name.endswith(".py")
     ]
 
 
@@ -70,21 +70,20 @@ async def test_mixed_multipart_single_file(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)
 
     form_data = aiohttp.FormData()
-    form_data.add_field('dir_name', os.path.dirname(__file__))
-    form_data.add_field('myfile', open(__file__, 'rb'))
+    form_data.add_field("dir_name", os.path.dirname(__file__))
+    form_data.add_field("myfile", open(__file__, "rb"))
 
     resp = await app_client.post(
-        '/v1.0/mixed_single_file',
+        "/v1.0/mixed_single_file",
         data=form_data(),
     )
 
     data = await resp.json()
 
     assert resp.status == 200
-    assert data['dir_name'] == os.path.dirname(__file__)
-    assert data['fileName'] == f'{__name__}.py'
-    assert data['myfile_content'] == Path(__file__).read_bytes().decode('utf8')
-
+    assert data["dir_name"] == os.path.dirname(__file__)
+    assert data["fileName"] == f"{__name__}.py"
+    assert data["myfile_content"] == Path(__file__).read_bytes().decode("utf8")
 
 
 async def test_mixed_multipart_many_files(aiohttp_app, aiohttp_client):
@@ -92,26 +91,28 @@ async def test_mixed_multipart_many_files(aiohttp_app, aiohttp_client):
 
     dir_name = os.path.dirname(__file__)
     files_field = [
-        ('myfiles', open(f'{dir_name}/{file_name}', 'rb')) \
-            for file_name in sorted(os.listdir(dir_name)) if file_name.endswith('.py')
+        ("myfiles", open(f"{dir_name}/{file_name}", "rb"))
+        for file_name in sorted(os.listdir(dir_name))
+        if file_name.endswith(".py")
     ]
 
     form_data = aiohttp.FormData(fields=files_field)
-    form_data.add_field('dir_name', os.path.dirname(__file__))
-    form_data.add_field('test_count', str(len(files_field)))
+    form_data.add_field("dir_name", os.path.dirname(__file__))
+    form_data.add_field("test_count", str(len(files_field)))
 
     resp = await app_client.post(
-        '/v1.0/mixed_many_files',
+        "/v1.0/mixed_many_files",
         data=form_data(),
     )
 
     data = await resp.json()
 
     assert resp.status == 200
-    assert data['dir_name'] == os.path.dirname(__file__)
-    assert data['test_count'] == len(files_field)
-    assert data['files_count'] == len(files_field)
-    assert data['myfiles_content'] == [
-        Path(f'{dir_name}/{file_name}').read_bytes().decode('utf8') \
-            for file_name in sorted(os.listdir(dir_name)) if file_name.endswith('.py')
+    assert data["dir_name"] == os.path.dirname(__file__)
+    assert data["test_count"] == len(files_field)
+    assert data["files_count"] == len(files_field)
+    assert data["myfiles_content"] == [
+        Path(f"{dir_name}/{file_name}").read_bytes().decode("utf8")
+        for file_name in sorted(os.listdir(dir_name))
+        if file_name.endswith(".py")
     ]
diff --git a/tests/aiohttp/test_aiohttp_reverse_proxy.py b/tests/aiohttp/test_aiohttp_reverse_proxy.py
index 7a87808..a0ed7f7 100644
--- a/tests/aiohttp/test_aiohttp_reverse_proxy.py
+++ b/tests/aiohttp/test_aiohttp_reverse_proxy.py
@@ -10,7 +10,6 @@
 
 
 class XPathForwarded(XForwardedBase):
-
     def __init__(self, num=1):
         self._num = num
 
@@ -28,21 +27,21 @@ async def middleware(self, request, handler):
 
             forwarded_for = self.get_forwarded_for(headers)
             if forwarded_for:
-                overrides['remote'] = str(forwarded_for[-self._num])
+                overrides["remote"] = str(forwarded_for[-self._num])
 
             proto = self.get_forwarded_proto(headers)
             if proto:
-                overrides['scheme'] = proto[-self._num]
+                overrides["scheme"] = proto[-self._num]
 
             host = self.get_forwarded_host(headers)
             if host is not None:
-                overrides['host'] = host
+                overrides["host"] = host
 
             prefix = self.get_forwarded_path(headers)
             if prefix is not None:
-                prefix = '/' + prefix.strip('/') + '/'
-                request_path = URL(request.path.lstrip('/'))
-                overrides['rel_url'] = URL(prefix).join(request_path)
+                prefix = "/" + prefix.strip("/") + "/"
+                request_path = URL(request.path.lstrip("/"))
+                overrides["rel_url"] = URL(prefix).join(request_path)
 
             request = request.clone(**overrides)
 
@@ -51,78 +50,62 @@ async def middleware(self, request, handler):
             exc.log(request)
         await self.raise_error(request)
 
-
     async def test_swagger_json_behind_proxy(simple_api_spec_dir, aiohttp_client):
-        """ Verify the swagger.json file is returned with base_path updated
-            according to X-Forwarded-Path header. """
-        app = AioHttpApp(__name__, port=5001,
-                         specification_dir=simple_api_spec_dir,
-                         debug=True)
-        api = app.add_api('swagger.yaml')
+        """Verify the swagger.json file is returned with base_path updated
+        according to X-Forwarded-Path header."""
+        app = AioHttpApp(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
+        api = app.add_api("swagger.yaml")
 
         aio = app.app
         reverse_proxied = XPathForwarded()
         aio.middlewares.append(reverse_proxied.middleware)
 
         app_client = await aiohttp_client(app.app)
-        headers = {'X-Forwarded-Path': '/behind/proxy'}
+        headers = {"X-Forwarded-Path": "/behind/proxy"}
 
-        swagger_ui = await app_client.get('/v1.0/ui/', headers=headers)
+        swagger_ui = await app_client.get("/v1.0/ui/", headers=headers)
         assert swagger_ui.status == 200
-        assert b'url = "/behind/proxy/v1.0/swagger.json"' in (
-            await swagger_ui.read()
-        )
+        assert b'url = "/behind/proxy/v1.0/swagger.json"' in (await swagger_ui.read())
 
-        swagger_json = await app_client.get('/v1.0/swagger.json', headers=headers)
+        swagger_json = await app_client.get("/v1.0/swagger.json", headers=headers)
         assert swagger_json.status == 200
-        assert swagger_json.headers.get('Content-Type') == 'application/json'
+        assert swagger_json.headers.get("Content-Type") == "application/json"
         json_ = await swagger_json.json()
 
-        assert api.specification.raw['basePath'] == '/v1.0', \
-            "Original specifications should not have been changed"
-
-        assert json_.get('basePath') == '/behind/proxy/v1.0', \
-            "basePath should contains original URI"
+        assert api.specification.raw["basePath"] == "/v1.0", "Original specifications should not have been changed"
 
-        json_['basePath'] = api.specification.raw['basePath']
-        assert api.specification.raw == json_, \
-            "Only basePath should have been updated"
+        assert json_.get("basePath") == "/behind/proxy/v1.0", "basePath should contains original URI"
 
+        json_["basePath"] = api.specification.raw["basePath"]
+        assert api.specification.raw == json_, "Only basePath should have been updated"
 
     async def test_openapi_json_behind_proxy(simple_api_spec_dir, aiohttp_client):
-        """ Verify the swagger.json file is returned with base_path updated
-            according to X-Forwarded-Path header. """
-        app = AioHttpApp(__name__, port=5001,
-                         specification_dir=simple_api_spec_dir,
-                         debug=True)
+        """Verify the swagger.json file is returned with base_path updated
+        according to X-Forwarded-Path header."""
+        app = AioHttpApp(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
 
-        api = app.add_api('openapi.yaml')
+        api = app.add_api("openapi.yaml")
 
         aio = app.app
         reverse_proxied = XPathForwarded()
         aio.middlewares.append(reverse_proxied.middleware)
 
         app_client = await aiohttp_client(app.app)
-        headers = {'X-Forwarded-Path': '/behind/proxy'}
+        headers = {"X-Forwarded-Path": "/behind/proxy"}
 
-        swagger_ui = await app_client.get('/v1.0/ui/', headers=headers)
+        swagger_ui = await app_client.get("/v1.0/ui/", headers=headers)
         assert swagger_ui.status == 200
-        assert b'url: "/behind/proxy/v1.0/openapi.json"' in (
-            await swagger_ui.read()
-        )
+        assert b'url: "/behind/proxy/v1.0/openapi.json"' in (await swagger_ui.read())
 
-        swagger_json = await app_client.get('/v1.0/openapi.json', headers=headers)
+        swagger_json = await app_client.get("/v1.0/openapi.json", headers=headers)
         assert swagger_json.status == 200
-        assert swagger_json.headers.get('Content-Type') == 'application/json'
+        assert swagger_json.headers.get("Content-Type") == "application/json"
         json_ = await swagger_json.json()
 
-        assert json_.get('servers', [{}])[0].get('url') == '/behind/proxy/v1.0', \
-            "basePath should contains original URI"
+        assert json_.get("servers", [{}])[0].get("url") == "/behind/proxy/v1.0", "basePath should contains original URI"
 
-        url = api.specification.raw.get('servers', [{}])[0].get('url')
-        assert url != '/behind/proxy/v1.0', \
-            "Original specifications should not have been changed"
+        url = api.specification.raw.get("servers", [{}])[0].get("url")
+        assert url != "/behind/proxy/v1.0", "Original specifications should not have been changed"
 
-        json_['servers'] = api.specification.raw.get('servers')
-        assert api.specification.raw == json_, \
-            "Only there servers block should have been updated"
+        json_["servers"] = api.specification.raw.get("servers")
+        assert api.specification.raw == json_, "Only there servers block should have been updated"
diff --git a/tests/aiohttp/test_aiohttp_simple_api.py b/tests/aiohttp/test_aiohttp_simple_api.py
index 8ba587c..3f1c9b7 100644
--- a/tests/aiohttp/test_aiohttp_simple_api.py
+++ b/tests/aiohttp/test_aiohttp_simple_api.py
@@ -13,44 +13,39 @@
 
 @pytest.fixture
 def aiohttp_app(aiohttp_api_spec_dir):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     options = {"validate_responses": True}
-    app.add_api('swagger_simple.yaml', validate_responses=True, pass_context_arg_name='request_ctx', options=options)
+    app.add_api("swagger_simple.yaml", validate_responses=True, pass_context_arg_name="request_ctx", options=options)
     return app
 
 
 async def test_app(aiohttp_app, aiohttp_client):
     # Create the app and run the test_app testcase below.
     app_client = await aiohttp_client(aiohttp_app.app)
-    get_bye = await app_client.get('/v1.0/bye/jsantos')
+    get_bye = await app_client.get("/v1.0/bye/jsantos")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'Goodbye jsantos'
+    assert (await get_bye.read()) == b"Goodbye jsantos"
 
 
 async def test_app_with_relative_path(aiohttp_api_spec_dir, aiohttp_client):
     # Create the app with a relative path and run the test_app testcase below.
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir='..' /
-                                       aiohttp_api_spec_dir.relative_to(TEST_FOLDER),
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(
+        __name__, port=5001, specification_dir=".." / aiohttp_api_spec_dir.relative_to(TEST_FOLDER), debug=True
+    )
+    app.add_api("swagger_simple.yaml")
     app_client = await aiohttp_client(app.app)
-    get_bye = await app_client.get('/v1.0/bye/jsantos')
+    get_bye = await app_client.get("/v1.0/bye/jsantos")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'Goodbye jsantos'
+    assert (await get_bye.read()) == b"Goodbye jsantos"
 
 
 async def test_swagger_json(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger.json file is returned for default setting passed to app. """
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    api = app.add_api('swagger_simple.yaml')
+    """Verify the swagger.json file is returned for default setting passed to app."""
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    api = app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_json = await app_client.get('/v1.0/swagger.json')
+    swagger_json = await app_client.get("/v1.0/swagger.json")
 
     assert swagger_json.status == 200
     json_ = await swagger_json.json()
@@ -58,14 +53,12 @@ async def test_swagger_json(aiohttp_api_spec_dir, aiohttp_client):
 
 
 async def test_swagger_yaml(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger.yaml file is returned for default setting passed to app. """
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    api = app.add_api('swagger_simple.yaml')
+    """Verify the swagger.yaml file is returned for default setting passed to app."""
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    api = app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    spec_response = await app_client.get('/v1.0/swagger.yaml')
+    spec_response = await app_client.get("/v1.0/swagger.yaml")
     data_ = await spec_response.read()
 
     assert spec_response.status == 200
@@ -73,62 +66,51 @@ async def test_swagger_yaml(aiohttp_api_spec_dir, aiohttp_client):
 
 
 async def test_no_swagger_json(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger.json file is not returned when set to False when creating app. """
+    """Verify the swagger.json file is not returned when set to False when creating app."""
     options = {"swagger_json": False}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     options=options,
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, options=options, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_json = await app_client.get('/v1.0/swagger.json')  # type: flask.Response
+    swagger_json = await app_client.get("/v1.0/swagger.json")  # type: flask.Response
     assert swagger_json.status == 404
 
 
 async def test_no_swagger_yaml(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger.json file is not returned when set to False when creating app. """
+    """Verify the swagger.json file is not returned when set to False when creating app."""
     options = {"swagger_json": False}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     options=options,
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, options=options, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    spec_response = await app_client.get('/v1.0/swagger.yaml')  # type: flask.Response
+    spec_response = await app_client.get("/v1.0/swagger.yaml")  # type: flask.Response
     assert spec_response.status == 404
 
 
 async def test_swagger_ui(aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui')
+    swagger_ui = await app_client.get("/v1.0/ui")
     assert swagger_ui.status == 200
-    assert swagger_ui.url.path == '/v1.0/ui/'
+    assert swagger_ui.url.path == "/v1.0/ui/"
     assert b'url = "/v1.0/swagger.json"' in (await swagger_ui.read())
 
-    swagger_ui = await app_client.get('/v1.0/ui/')
+    swagger_ui = await app_client.get("/v1.0/ui/")
     assert swagger_ui.status == 200
     assert b'url = "/v1.0/swagger.json"' in (await swagger_ui.read())
 
 
 async def test_swagger_ui_config_json(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger-ui-config.json file is returned for swagger_ui_config option passed to app. """
+    """Verify the swagger-ui-config.json file is returned for swagger_ui_config option passed to app."""
     swagger_ui_config = {"displayOperationId": True}
     options = {"swagger_ui_config": swagger_ui_config}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     options=options,
-                     debug=True)
-    api = app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, options=options, debug=True)
+    api = app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui_config_json = await app_client.get('/v1.0/ui/swagger-ui-config.json')
+    swagger_ui_config_json = await app_client.get("/v1.0/ui/swagger-ui-config.json")
     json_ = await swagger_ui_config_json.read()
 
     assert swagger_ui_config_json.status == 200
@@ -136,241 +118,217 @@ async def test_swagger_ui_config_json(aiohttp_api_spec_dir, aiohttp_client):
 
 
 async def test_no_swagger_ui_config_json(aiohttp_api_spec_dir, aiohttp_client):
-    """ Verify the swagger-ui-config.json file is not returned when the swagger_ui_config option not passed to app. """
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    """Verify the swagger-ui-config.json file is not returned when the swagger_ui_config option not passed to app."""
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui_config_json = await app_client.get('/v1.0/ui/swagger-ui-config.json')
+    swagger_ui_config_json = await app_client.get("/v1.0/ui/swagger-ui-config.json")
     assert swagger_ui_config_json.status == 404
 
 
 async def test_swagger_ui_index(aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('openapi_secure.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("openapi_secure.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui/index.html')
+    swagger_ui = await app_client.get("/v1.0/ui/index.html")
     assert swagger_ui.status == 200
     assert b'url: "/v1.0/openapi.json"' in (await swagger_ui.read())
-    assert b'swagger-ui-config.json' not in (await swagger_ui.read())
+    assert b"swagger-ui-config.json" not in (await swagger_ui.read())
 
 
 async def test_swagger_ui_index_with_config(aiohttp_api_spec_dir, aiohttp_client):
     swagger_ui_config = {"displayOperationId": True}
     options = {"swagger_ui_config": swagger_ui_config}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     options=options,
-                     debug=True)
-    app.add_api('openapi_secure.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, options=options, debug=True)
+    app.add_api("openapi_secure.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui/index.html')
+    swagger_ui = await app_client.get("/v1.0/ui/index.html")
     assert swagger_ui.status == 200
     assert b'configUrl: "swagger-ui-config.json"' in (await swagger_ui.read())
 
 
 async def test_pythonic_path_param(aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('openapi_simple.yaml', pythonic_params=True)
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("openapi_simple.yaml", pythonic_params=True)
 
     app_client = await aiohttp_client(app.app)
-    pythonic = await app_client.get('/v1.0/pythonic/100')
+    pythonic = await app_client.get("/v1.0/pythonic/100")
     assert pythonic.status == 200
     j = await pythonic.json()
-    assert j['id_'] == 100
+    assert j["id_"] == 100
 
 
 async def test_cookie_param(aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('openapi_simple.yaml', pass_context_arg_name="request")
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("openapi_simple.yaml", pass_context_arg_name="request")
 
     app_client = await aiohttp_client(app.app)
-    response = await app_client.get('/v1.0/test-cookie-param', headers={"Cookie": "test_cookie=hello"})
+    response = await app_client.get("/v1.0/test-cookie-param", headers={"Cookie": "test_cookie=hello"})
     assert response.status == 200
     j = await response.json()
-    assert j['cookie_value'] == "hello"
+    assert j["cookie_value"] == "hello"
 
 
 async def test_swagger_ui_static(aiohttp_api_spec_dir, aiohttp_client):
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui/lib/swagger-oauth.js')
+    swagger_ui = await app_client.get("/v1.0/ui/lib/swagger-oauth.js")
     assert swagger_ui.status == 200
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui/swagger-ui.min.js')
+    swagger_ui = await app_client.get("/v1.0/ui/swagger-ui.min.js")
     assert swagger_ui.status == 200
 
 
 async def test_no_swagger_ui(aiohttp_api_spec_dir, aiohttp_client):
     options = {"swagger_ui": False}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     options=options, debug=True)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, options=options, debug=True)
+    app.add_api("swagger_simple.yaml")
 
     app_client = await aiohttp_client(app.app)
-    swagger_ui = await app_client.get('/v1.0/ui/')
+    swagger_ui = await app_client.get("/v1.0/ui/")
     assert swagger_ui.status == 404
 
-    app2 = AioHttpApp(__name__, port=5001,
-                      specification_dir=aiohttp_api_spec_dir,
-                      debug=True)
+    app2 = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
     options = {"swagger_ui": False}
-    app2.add_api('swagger_simple.yaml', options=options)
+    app2.add_api("swagger_simple.yaml", options=options)
     app2_client = await aiohttp_client(app.app)
-    swagger_ui2 = await app2_client.get('/v1.0/ui/')
+    swagger_ui2 = await app2_client.get("/v1.0/ui/")
     assert swagger_ui2.status == 404
 
 
 async def test_middlewares(aiohttp_api_spec_dir, aiohttp_client):
     async def middleware(app, handler):
         async def middleware_handler(request):
-            response = (await handler(request))
-            response.body += b' middleware'
+            response = await handler(request)
+            response.body += b" middleware"
             return response
 
         return middleware_handler
 
     options = {"middlewares": [middleware]}
-    app = AioHttpApp(__name__, port=5001,
-                     specification_dir=aiohttp_api_spec_dir,
-                     debug=True, options=options)
-    app.add_api('swagger_simple.yaml')
+    app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True, options=options)
+    app.add_api("swagger_simple.yaml")
     app_client = await aiohttp_client(app.app)
-    get_bye = await app_client.get('/v1.0/bye/jsantos')
+    get_bye = await app_client.get("/v1.0/bye/jsantos")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'Goodbye jsantos middleware'
+    assert (await get_bye.read()) == b"Goodbye jsantos middleware"
 
 
 async def test_response_with_str_body(aiohttp_app, aiohttp_client):
     # Create the app and run the test_app testcase below.
     app_client = await aiohttp_client(aiohttp_app.app)
-    get_bye = await app_client.get('/v1.0/aiohttp_str_response')
+    get_bye = await app_client.get("/v1.0/aiohttp_str_response")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'str response'
+    assert (await get_bye.read()) == b"str response"
 
 
 async def test_response_with_non_str_and_non_json_body(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)
-    get_bye = await app_client.get(
-        '/v1.0/aiohttp_non_str_non_json_response'
-    )
+    get_bye = await app_client.get("/v1.0/aiohttp_non_str_non_json_response")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'1234'
+    assert (await get_bye.read()) == b"1234"
 
 
 async def test_response_with_bytes_body(aiohttp_app, aiohttp_client):
     # Create the app and run the test_app testcase below.
     app_client = await aiohttp_client(aiohttp_app.app)
-    get_bye = await app_client.get('/v1.0/aiohttp_bytes_response')
+    get_bye = await app_client.get("/v1.0/aiohttp_bytes_response")
     assert get_bye.status == 200
-    assert (await get_bye.read()) == b'bytes response'
+    assert (await get_bye.read()) == b"bytes response"
 
 
 async def test_validate_responses(aiohttp_app, aiohttp_client):
     app_client = await aiohttp_client(aiohttp_app.app)
-    get_bye = await app_client.get('/v1.0/aiohttp_validate_responses')
+    get_bye = await app_client.get("/v1.0/aiohttp_validate_responses")
     assert get_bye.status == 200
     assert (await get_bye.json()) == {"validate": True}
 
 
 async def test_get_users(aiohttp_client, aiohttp_app):
     app_client = await aiohttp_client(aiohttp_app.app)
-    resp = await app_client.get('/v1.0/users')
-    assert resp.url.path == '/v1.0/users/'  # followed redirect
+    resp = await app_client.get("/v1.0/users")
+    assert resp.url.path == "/v1.0/users/"  # followed redirect
     assert resp.status == 200
 
     json_data = await resp.json()
-    assert json_data == \
-           [{'name': 'John Doe', 'id': 1}, {'name': 'Nick Carlson', 'id': 2}]
+    assert json_data == [{"name": "John Doe", "id": 1}, {"name": "Nick Carlson", "id": 2}]
 
 
 async def test_create_user(aiohttp_client, aiohttp_app):
     app_client = await aiohttp_client(aiohttp_app.app)
-    user = {'name': 'Maksim'}
-    resp = await app_client.post('/v1.0/users', json=user, headers={'Content-type': 'application/json'})
+    user = {"name": "Maksim"}
+    resp = await app_client.post("/v1.0/users", json=user, headers={"Content-type": "application/json"})
     assert resp.status == 201
 
 
 async def test_access_request_context(aiohttp_client, aiohttp_app):
     app_client = await aiohttp_client(aiohttp_app.app)
-    resp = await app_client.post('/v1.0/aiohttp_access_request_context/')
+    resp = await app_client.post("/v1.0/aiohttp_access_request_context/")
     assert resp.status == 204
 
 
 async def test_query_parsing_simple(aiohttp_client, aiohttp_app):
-    expected_query = 'query'
+    expected_query = "query"
 
     app_client = await aiohttp_client(aiohttp_app.app)
     resp = await app_client.get(
-        '/v1.0/aiohttp_query_parsing_str',
+        "/v1.0/aiohttp_query_parsing_str",
         params={
-            'query': expected_query,
+            "query": expected_query,
         },
     )
     assert resp.status == 200
 
     json_data = await resp.json()
-    assert json_data == {'query': expected_query}
+    assert json_data == {"query": expected_query}
 
 
 async def test_query_parsing_array(aiohttp_client, aiohttp_app):
-    expected_query = ['queryA', 'queryB']
+    expected_query = ["queryA", "queryB"]
 
     app_client = await aiohttp_client(aiohttp_app.app)
     resp = await app_client.get(
-        '/v1.0/aiohttp_query_parsing_array',
+        "/v1.0/aiohttp_query_parsing_array",
         params={
-            'query': ','.join(expected_query),
+            "query": ",".join(expected_query),
         },
     )
     assert resp.status == 200
 
     json_data = await resp.json()
-    assert json_data == {'query': expected_query}
+    assert json_data == {"query": expected_query}
 
 
 async def test_query_parsing_array_multi(aiohttp_client, aiohttp_app):
-    expected_query = ['queryA', 'queryB', 'queryC']
-    query_str = '&'.join(['query=%s' % q for q in expected_query])
+    expected_query = ["queryA", "queryB", "queryC"]
+    query_str = "&".join(["query=%s" % q for q in expected_query])
 
     app_client = await aiohttp_client(aiohttp_app.app)
     resp = await app_client.get(
-        '/v1.0/aiohttp_query_parsing_array_multi?%s' % query_str,
+        "/v1.0/aiohttp_query_parsing_array_multi?%s" % query_str,
     )
     assert resp.status == 200
 
     json_data = await resp.json()
-    assert json_data == {'query': expected_query}
+    assert json_data == {"query": expected_query}
 
 
 if sys.version_info[0:2] >= (3, 5):
+
     @pytest.fixture
     def aiohttp_app_async_def(aiohttp_api_spec_dir):
-        app = AioHttpApp(__name__, port=5001,
-                         specification_dir=aiohttp_api_spec_dir,
-                         debug=True)
-        app.add_api('swagger_simple_async_def.yaml', validate_responses=True)
+        app = AioHttpApp(__name__, port=5001, specification_dir=aiohttp_api_spec_dir, debug=True)
+        app.add_api("swagger_simple_async_def.yaml", validate_responses=True)
         return app
 
-
     async def test_validate_responses_async_def(aiohttp_app_async_def, aiohttp_client):
         app_client = await aiohttp_client(aiohttp_app_async_def.app)
-        get_bye = await app_client.get('/v1.0/aiohttp_validate_responses')
+        get_bye = await app_client.get("/v1.0/aiohttp_validate_responses")
         assert get_bye.status == 200
         assert (await get_bye.read()) == b'{"validate": true}'
diff --git a/tests/aiohttp/test_get_response.py b/tests/aiohttp/test_get_response.py
index dee1322..e8ab45b 100644
--- a/tests/aiohttp/test_get_response.py
+++ b/tests/aiohttp/test_get_response.py
@@ -6,124 +6,126 @@
 from firetail.lifecycle import FiretailResponse
 
 
-@pytest.fixture(scope='module')
+@pytest.fixture(scope="module")
 def api(aiohttp_api_spec_dir):
-    yield AioHttpApi(specification=aiohttp_api_spec_dir / 'swagger_secure.yaml')
+    yield AioHttpApi(specification=aiohttp_api_spec_dir / "swagger_secure.yaml")
 
 
 async def test_get_response_from_aiohttp_response(api):
-    response = await api.get_response(web.Response(text='foo', status=201, headers={'X-header': 'value'}))
+    response = await api.get_response(web.Response(text="foo", status=201, headers={"X-header": "value"}))
     assert isinstance(response, web.Response)
     assert response.status == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_response_from_aiohttp_stream_response(api):
-    response = await api.get_response(web.StreamResponse(status=201, headers={'X-header': 'value'}))
+    response = await api.get_response(web.StreamResponse(status=201, headers={"X-header": "value"}))
     assert isinstance(response, web.StreamResponse)
     assert response.status == 201
-    assert response.content_type == 'application/octet-stream'
-    assert dict(response.headers) == {'X-header': 'value'}
+    assert response.content_type == "application/octet-stream"
+    assert dict(response.headers) == {"X-header": "value"}
 
 
 async def test_get_response_from_firetail_response(api):
-    response = await api.get_response(FiretailResponse(status_code=201, mimetype='text/plain', body='foo', headers={'X-header': 'value'}))
+    response = await api.get_response(
+        FiretailResponse(status_code=201, mimetype="text/plain", body="foo", headers={"X-header": "value"})
+    )
     assert isinstance(response, web.Response)
     assert response.status == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_response_from_string(api):
-    response = await api.get_response('foo')
+    response = await api.get_response("foo")
     assert isinstance(response, web.Response)
     assert response.status == 200
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8"}
 
 
 async def test_get_response_from_string_tuple(api):
-    response = await api.get_response(('foo',))
+    response = await api.get_response(("foo",))
     assert isinstance(response, web.Response)
     assert response.status == 200
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8"}
 
 
 async def test_get_response_from_string_status(api):
-    response = await api.get_response(('foo', 201))
+    response = await api.get_response(("foo", 201))
     assert isinstance(response, web.Response)
     assert response.status == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8"}
 
 
 async def test_get_response_from_string_headers(api):
-    response = await api.get_response(('foo', {'X-header': 'value'}))
+    response = await api.get_response(("foo", {"X-header": "value"}))
     assert isinstance(response, web.Response)
     assert response.status == 200
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_response_from_string_status_headers(api):
-    response = await api.get_response(('foo', 201, {'X-header': 'value'}))
+    response = await api.get_response(("foo", 201, {"X-header": "value"}))
     assert isinstance(response, web.Response)
     assert response.status == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_response_from_tuple_error(api):
     with pytest.raises(TypeError) as e:
-        await api.get_response((web.Response(text='foo', status=201, headers={'X-header': 'value'}), 200))
+        await api.get_response((web.Response(text="foo", status=201, headers={"X-header": "value"}), 200))
     assert str(e.value) == "Cannot return web.StreamResponse in tuple. Only raw data can be returned in tuple."
 
 
 async def test_get_response_from_dict(api):
-    response = await api.get_response({'foo': 'bar'})
+    response = await api.get_response({"foo": "bar"})
     assert isinstance(response, web.Response)
     assert response.status == 200
     # odd, yes. but backwards compatible. see test_response_with_non_str_and_non_json_body in tests/aiohttp/test_aiohttp_simple_api.py
     # TODO: This should be made into JSON when aiohttp and flask serialization can be harmonized.
     assert response.body == b"{'foo': 'bar'}"
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8'}
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8"}
 
 
 async def test_get_response_from_dict_json(api):
-    response = await api.get_response({'foo': 'bar'}, mimetype='application/json')
+    response = await api.get_response({"foo": "bar"}, mimetype="application/json")
     assert isinstance(response, web.Response)
     assert response.status == 200
     assert json.loads(response.body.decode()) == {"foo": "bar"}
-    assert response.content_type == 'application/json'
-    assert dict(response.headers) == {'Content-Type': 'application/json; charset=utf-8'}
+    assert response.content_type == "application/json"
+    assert dict(response.headers) == {"Content-Type": "application/json; charset=utf-8"}
 
 
 async def test_get_response_no_data(api):
-    response = await api.get_response(None, mimetype='application/json')
+    response = await api.get_response(None, mimetype="application/json")
     assert isinstance(response, web.Response)
     assert response.status == 204
     assert response.body is None
-    assert response.content_type == 'application/json'
-    assert dict(response.headers) == {'Content-Type': 'application/json'}
+    assert response.content_type == "application/json"
+    assert dict(response.headers) == {"Content-Type": "application/json"}
 
 
 async def test_get_response_binary_json(api):
-    response = await api.get_response(b'{"foo":"bar"}', mimetype='application/json')
+    response = await api.get_response(b'{"foo":"bar"}', mimetype="application/json")
     assert isinstance(response, web.Response)
     assert response.status == 200
     assert json.loads(response.body.decode()) == {"foo": "bar"}
-    assert response.content_type == 'application/json'
-    assert dict(response.headers) == {'Content-Type': 'application/json'}
+    assert response.content_type == "application/json"
+    assert dict(response.headers) == {"Content-Type": "application/json"}
 
 
 async def test_get_response_binary_no_mimetype(api):
@@ -131,41 +133,43 @@ async def test_get_response_binary_no_mimetype(api):
     assert isinstance(response, web.Response)
     assert response.status == 200
     assert response.body == b'{"foo":"bar"}'
-    assert response.content_type == 'application/octet-stream'
+    assert response.content_type == "application/octet-stream"
     assert dict(response.headers) == {}
 
 
 async def test_get_firetail_response_from_aiohttp_response(api):
-    response = api.get_firetail_response(web.Response(text='foo', status=201, headers={'X-header': 'value'}))
+    response = api.get_firetail_response(web.Response(text="foo", status=201, headers={"X-header": "value"}))
     assert isinstance(response, FiretailResponse)
     assert response.status_code == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_firetail_response_from_firetail_response(api):
-    response = api.get_firetail_response(FiretailResponse(status_code=201, content_type='text/plain', body='foo', headers={'X-header': 'value'}))
+    response = api.get_firetail_response(
+        FiretailResponse(status_code=201, content_type="text/plain", body="foo", headers={"X-header": "value"})
+    )
     assert isinstance(response, FiretailResponse)
     assert response.status_code == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_firetail_response_from_tuple(api):
-    response = api.get_firetail_response(('foo', 201, {'X-header': 'value'}))
+    response = api.get_firetail_response(("foo", 201, {"X-header": "value"}))
     assert isinstance(response, FiretailResponse)
     assert response.status_code == 201
-    assert response.body == b'foo'
-    assert response.content_type == 'text/plain'
-    assert dict(response.headers) == {'Content-Type': 'text/plain; charset=utf-8', 'X-header': 'value'}
+    assert response.body == b"foo"
+    assert response.content_type == "text/plain"
+    assert dict(response.headers) == {"Content-Type": "text/plain; charset=utf-8", "X-header": "value"}
 
 
 async def test_get_firetail_response_from_aiohttp_stream_response(api):
-    response = api.get_firetail_response(web.StreamResponse(status=201, headers={'X-header': 'value'}))
+    response = api.get_firetail_response(web.StreamResponse(status=201, headers={"X-header": "value"}))
     assert isinstance(response, FiretailResponse)
     assert response.status_code == 201
     assert response.body == None
-    assert response.content_type == 'application/octet-stream'
-    assert dict(response.headers) == {'X-header': 'value'}
+    assert response.content_type == "application/octet-stream"
+    assert dict(response.headers) == {"X-header": "value"}
diff --git a/tests/api/test_bootstrap.py b/tests/api/test_bootstrap.py
index 22b691d..f8a8a15 100644
--- a/tests/api/test_bootstrap.py
+++ b/tests/api/test_bootstrap.py
@@ -16,24 +16,23 @@
 @pytest.mark.parametrize("spec", SPECS)
 def test_app_with_relative_path(simple_api_spec_dir, spec):
     # Create the app with a relative path and run the test_app testcase below.
-    app = App(__name__, port=5001,
-              specification_dir='..' / simple_api_spec_dir.relative_to(TEST_FOLDER),
-              debug=True)
+    app = App(__name__, port=5001, specification_dir=".." / simple_api_spec_dir.relative_to(TEST_FOLDER), debug=True)
     app.add_api(spec)
 
     app_client = app.app.test_client()
-    get_bye = app_client.get('/v1.0/bye/jsantos')  # type: flask.Response
+    get_bye = app_client.get("/v1.0/bye/jsantos")  # type: flask.Response
     assert get_bye.status_code == 200
-    assert get_bye.data == b'Goodbye jsantos'
+    assert get_bye.data == b"Goodbye jsantos"
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_app_with_resolver(simple_api_spec_dir, spec):
     from firetail.resolver import Resolver
+
     resolver = Resolver()
-    app = App(__name__, port=5001,
-              specification_dir='..' / simple_api_spec_dir.relative_to(TEST_FOLDER),
-              resolver=resolver)
+    app = App(
+        __name__, port=5001, specification_dir=".." / simple_api_spec_dir.relative_to(TEST_FOLDER), resolver=resolver
+    )
     api = app.add_api(spec)
     assert api.resolver is resolver
 
@@ -41,33 +40,38 @@ def test_app_with_resolver(simple_api_spec_dir, spec):
 @pytest.mark.parametrize("spec", SPECS)
 def test_app_with_different_server_option(simple_api_spec_dir, spec):
     # Create the app with a relative path and run the test_app testcase below.
-    app = App(__name__, port=5001,
-              server='gevent',
-              specification_dir='..' / simple_api_spec_dir.relative_to(TEST_FOLDER),
-              debug=True)
+    app = App(
+        __name__,
+        port=5001,
+        server="gevent",
+        specification_dir=".." / simple_api_spec_dir.relative_to(TEST_FOLDER),
+        debug=True,
+    )
     app.add_api(spec)
 
     app_client = app.app.test_client()
-    get_bye = app_client.get('/v1.0/bye/jsantos')  # type: flask.Response
+    get_bye = app_client.get("/v1.0/bye/jsantos")  # type: flask.Response
     assert get_bye.status_code == 200
-    assert get_bye.data == b'Goodbye jsantos'
+    assert get_bye.data == b"Goodbye jsantos"
 
 
 def test_app_with_different_uri_parser(simple_api_spec_dir):
     from firetail.decorators.uri_parsing import FirstValueURIParser
-    app = App(__name__, port=5001,
-              specification_dir='..' / simple_api_spec_dir.relative_to(TEST_FOLDER),
-              options={"uri_parser_class": FirstValueURIParser},
-              debug=True)
-    app.add_api('swagger.yaml')
+
+    app = App(
+        __name__,
+        port=5001,
+        specification_dir=".." / simple_api_spec_dir.relative_to(TEST_FOLDER),
+        options={"uri_parser_class": FirstValueURIParser},
+        debug=True,
+    )
+    app.add_api("swagger.yaml")
 
     app_client = app.app.test_client()
-    resp = app_client.get(
-        '/v1.0/test_array_csv_query_param?items=a,b,c&items=d,e,f'
-    )  # type: flask.Response
+    resp = app_client.get("/v1.0/test_array_csv_query_param?items=a,b,c&items=d,e,f")  # type: flask.Response
     assert resp.status_code == 200
     j = json.loads(resp.get_data(as_text=True))
-    assert j == ['a', 'b', 'c']
+    assert j == ["a", "b", "c"]
 
 
 @pytest.mark.parametrize("spec", SPECS)
@@ -75,23 +79,22 @@ def test_swagger_ui(simple_api_spec_dir, spec):
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    swagger_ui = app_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui = app_client.get("/v1.0/ui/")  # type: flask.Response
     assert swagger_ui.status_code == 200
-    spec_json_filename = '/v1.0/{spec}'.format(spec=spec.replace("yaml", "json"))
+    spec_json_filename = "/v1.0/{spec}".format(spec=spec.replace("yaml", "json"))
     assert spec_json_filename.encode() in swagger_ui.data
     if "openapi" in spec:
-        assert b'swagger-ui-config.json' not in swagger_ui.data
+        assert b"swagger-ui-config.json" not in swagger_ui.data
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_swagger_ui_with_config(simple_api_spec_dir, spec):
     swagger_ui_config = {"displayOperationId": True}
     options = {"swagger_ui_config": swagger_ui_config}
-    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir,
-              options=options, debug=True)
+    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, options=options, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    swagger_ui = app_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui = app_client.get("/v1.0/ui/")  # type: flask.Response
     assert swagger_ui.status_code == 200
     if "openapi" in spec:
         assert b'configUrl: "swagger-ui-config.json"' in swagger_ui.data
@@ -100,31 +103,29 @@ def test_swagger_ui_with_config(simple_api_spec_dir, spec):
 @pytest.mark.parametrize("spec", SPECS)
 def test_no_swagger_ui(simple_api_spec_dir, spec):
     options = {"swagger_ui": False}
-    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir,
-              options=options, debug=True)
+    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, options=options, debug=True)
     app.add_api(spec)
 
     app_client = app.app.test_client()
-    swagger_ui = app_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui = app_client.get("/v1.0/ui/")  # type: flask.Response
     assert swagger_ui.status_code == 404
 
     app2 = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app2.add_api(spec, options={"swagger_ui": False})
     app2_client = app2.app.test_client()
-    swagger_ui2 = app2_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui2 = app2_client.get("/v1.0/ui/")  # type: flask.Response
     assert swagger_ui2.status_code == 404
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_swagger_ui_config_json(simple_api_spec_dir, spec):
-    """ Verify the swagger-ui-config.json file is returned for swagger_ui_config option passed to app. """
+    """Verify the swagger-ui-config.json file is returned for swagger_ui_config option passed to app."""
     swagger_ui_config = {"displayOperationId": True}
     options = {"swagger_ui_config": swagger_ui_config}
-    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir,
-              options=options, debug=True)
+    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, options=options, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    url = '/v1.0/ui/swagger-ui-config.json'
+    url = "/v1.0/ui/swagger-ui-config.json"
     swagger_ui_config_json = app_client.get(url)  # type: flask.Response
     assert swagger_ui_config_json.status_code == 200
     assert swagger_ui_config == json.loads(swagger_ui_config_json.get_data(as_text=True))
@@ -132,22 +133,22 @@ def test_swagger_ui_config_json(simple_api_spec_dir, spec):
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_no_swagger_ui_config_json(simple_api_spec_dir, spec):
-    """ Verify the swagger-ui-config.json file is not returned when the swagger_ui_config option not passed to app. """
+    """Verify the swagger-ui-config.json file is not returned when the swagger_ui_config option not passed to app."""
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    url = '/v1.0/ui/swagger-ui-config.json'
+    url = "/v1.0/ui/swagger-ui-config.json"
     swagger_ui_config_json = app_client.get(url)  # type: flask.Response
     assert swagger_ui_config_json.status_code == 404
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_swagger_json_app(simple_api_spec_dir, spec):
-    """ Verify the spec json file is returned for default setting passed to app. """
+    """Verify the spec json file is returned for default setting passed to app."""
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'
+    url = "/v1.0/{spec}"
     url = url.format(spec=spec.replace("yaml", "json"))
     spec_json = app_client.get(url)  # type: flask.Response
     assert spec_json.status_code == 200
@@ -155,11 +156,11 @@ def test_swagger_json_app(simple_api_spec_dir, spec):
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_swagger_yaml_app(simple_api_spec_dir, spec):
-    """ Verify the spec yaml file is returned for default setting passed to app. """
+    """Verify the spec yaml file is returned for default setting passed to app."""
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec)
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'
+    url = "/v1.0/{spec}"
     url = url.format(spec=spec)
     spec_response = app_client.get(url)  # type: flask.Response
     assert spec_response.status_code == 200
@@ -167,14 +168,13 @@ def test_swagger_yaml_app(simple_api_spec_dir, spec):
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_no_swagger_json_app(simple_api_spec_dir, spec):
-    """ Verify the spec json file is not returned when set to False when creating app. """
+    """Verify the spec json file is not returned when set to False when creating app."""
     options = {"serve_spec": False}
-    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir,
-              options=options, debug=True)
+    app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, options=options, debug=True)
     app.add_api(spec)
 
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'
+    url = "/v1.0/{spec}"
     url = url.format(spec=spec.replace("yaml", "json"))
     spec_json = app_client.get(url)  # type: flask.Response
     assert spec_json.status_code == 404
@@ -184,12 +184,12 @@ def test_no_swagger_json_app(simple_api_spec_dir, spec):
 def test_dict_as_yaml_path(simple_api_spec_dir, spec):
     openapi_yaml_path = simple_api_spec_dir / spec
 
-    with openapi_yaml_path.open(mode='rb') as openapi_yaml:
+    with openapi_yaml_path.open(mode="rb") as openapi_yaml:
         contents = openapi_yaml.read()
         try:
             openapi_template = contents.decode()
         except UnicodeDecodeError:
-            openapi_template = contents.decode('utf-8', 'replace')
+            openapi_template = contents.decode("utf-8", "replace")
 
         openapi_string = jinja2.Template(openapi_template).render({})
         specification = yaml.load(openapi_string, ExtendedSafeLoader)  # type: dict
@@ -198,31 +198,31 @@ def test_dict_as_yaml_path(simple_api_spec_dir, spec):
     app.add_api(specification)
 
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'.format(spec=spec.replace("yaml", "json"))
+    url = "/v1.0/{spec}".format(spec=spec.replace("yaml", "json"))
     swagger_json = app_client.get(url)  # type: flask.Response
     assert swagger_json.status_code == 200
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_swagger_json_api(simple_api_spec_dir, spec):
-    """ Verify the spec json file is returned for default setting passed to api. """
+    """Verify the spec json file is returned for default setting passed to api."""
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec)
 
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'.format(spec=spec.replace("yaml", "json"))
+    url = "/v1.0/{spec}".format(spec=spec.replace("yaml", "json"))
     swagger_json = app_client.get(url)  # type: flask.Response
     assert swagger_json.status_code == 200
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_no_swagger_json_api(simple_api_spec_dir, spec):
-    """ Verify the spec json file is not returned when set to False when adding api. """
+    """Verify the spec json file is not returned when set to False when adding api."""
     app = App(__name__, port=5001, specification_dir=simple_api_spec_dir, debug=True)
     app.add_api(spec, options={"serve_spec": False})
 
     app_client = app.app.test_client()
-    url = '/v1.0/{spec}'.format(spec=spec.replace("yaml", "json"))
+    url = "/v1.0/{spec}".format(spec=spec.replace("yaml", "json"))
     swagger_json = app_client.get(url)  # type: flask.Response
     assert swagger_json.status_code == 404
 
@@ -230,79 +230,78 @@ def test_no_swagger_json_api(simple_api_spec_dir, spec):
 def test_swagger_json_content_type(simple_app):
     app_client = simple_app.app.test_client()
     spec = simple_app._spec_file
-    url = '/v1.0/{spec}'.format(spec=spec.replace("yaml", "json"))
+    url = "/v1.0/{spec}".format(spec=spec.replace("yaml", "json"))
     response = app_client.get(url)  # type: flask.Response
     assert response.status_code == 200
-    assert response.content_type == 'application/json'
+    assert response.content_type == "application/json"
 
 
 def test_single_route():
     app = App(__name__)
 
     def route1():
-        return 'single 1'
+        return "single 1"
 
-    @app.route('/single2', methods=['POST'])
+    @app.route("/single2", methods=["POST"])
     def route2():
-        return 'single 2'
+        return "single 2"
 
     app_client = app.app.test_client()
 
-    app.add_url_rule('/single1', 'single1', route1, methods=['GET'])
+    app.add_url_rule("/single1", "single1", route1, methods=["GET"])
 
-    get_single1 = app_client.get('/single1')  # type: flask.Response
-    assert get_single1.data == b'single 1'
+    get_single1 = app_client.get("/single1")  # type: flask.Response
+    assert get_single1.data == b"single 1"
 
-    post_single1 = app_client.post('/single1')  # type: flask.Response
+    post_single1 = app_client.post("/single1")  # type: flask.Response
     assert post_single1.status_code == 405
 
-    post_single2 = app_client.post('/single2')  # type: flask.Response
-    assert post_single2.data == b'single 2'
+    post_single2 = app_client.post("/single2")  # type: flask.Response
+    assert post_single2.data == b"single 2"
 
-    get_single2 = app_client.get('/single2')  # type: flask.Response
+    get_single2 = app_client.get("/single2")  # type: flask.Response
     assert get_single2.status_code == 405
 
 
 def test_resolve_method(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/resolver-test/method')  # type: flask.Response
+    resp = app_client.get("/v1.0/resolver-test/method")  # type: flask.Response
     assert resp.data == b'"DummyClass"\n'
 
 
 def test_resolve_classmethod(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/resolver-test/classmethod')  # type: flask.Response
-    assert resp.data.decode('utf-8', 'replace') == '"DummyClass"\n'
+    resp = app_client.get("/v1.0/resolver-test/classmethod")  # type: flask.Response
+    assert resp.data.decode("utf-8", "replace") == '"DummyClass"\n'
 
 
 @pytest.mark.parametrize("spec", SPECS)
 def test_add_api_with_function_resolver_function_is_wrapped(simple_api_spec_dir, spec):
     app = App(__name__, specification_dir=simple_api_spec_dir)
-    api = app.add_api(spec, resolver=lambda oid: (lambda foo: 'bar'))
-    assert api.resolver.resolve_function_from_operation_id('faux')('bah') == 'bar'
+    api = app.add_api(spec, resolver=lambda oid: (lambda foo: "bar"))
+    assert api.resolver.resolve_function_from_operation_id("faux")("bah") == "bar"
 
 
-def test_default_query_param_does_not_match_defined_type(
-        default_param_error_spec_dir):
+def test_default_query_param_does_not_match_defined_type(default_param_error_spec_dir):
     with pytest.raises(InvalidSpecification):
         build_app_from_fixture(default_param_error_spec_dir, validate_responses=True, debug=False)
 
 
 def test_handle_add_operation_error_debug(simple_api_spec_dir):
     app = App(__name__, specification_dir=simple_api_spec_dir, debug=True)
-    app.api_cls = type('AppTest', (app.api_cls,), {})
-    app.api_cls.add_operation = mock.MagicMock(side_effect=Exception('operation error!'))
-    api = app.add_api('swagger.yaml', resolver=lambda oid: (lambda foo: 'bar'))
+    app.api_cls = type("AppTest", (app.api_cls,), {})
+    app.api_cls.add_operation = mock.MagicMock(side_effect=Exception("operation error!"))
+    api = app.add_api("swagger.yaml", resolver=lambda oid: (lambda foo: "bar"))
     assert app.api_cls.add_operation.called
-    assert api.resolver.resolve_function_from_operation_id('faux')('bah') == 'bar'
+    assert api.resolver.resolve_function_from_operation_id("faux")("bah") == "bar"
 
 
 def test_handle_add_operation_error(simple_api_spec_dir):
     app = App(__name__, specification_dir=simple_api_spec_dir)
-    app.api_cls = type('AppTest', (app.api_cls,), {})
-    app.api_cls.add_operation = mock.MagicMock(side_effect=Exception('operation error!'))
+    app.api_cls = type("AppTest", (app.api_cls,), {})
+    app.api_cls.add_operation = mock.MagicMock(side_effect=Exception("operation error!"))
     with pytest.raises(Exception):
-        app.add_api('swagger.yaml', resolver=lambda oid: (lambda foo: 'bar'))
+        app.add_api("swagger.yaml", resolver=lambda oid: (lambda foo: "bar"))
 
 
 def test_using_all_fields_in_path_item(simple_api_spec_dir):
@@ -311,7 +310,7 @@ def test_using_all_fields_in_path_item(simple_api_spec_dir):
     test also that each http methods has its own endpoint.
     """
     app = App(__name__, specification_dir=simple_api_spec_dir)
-    app.add_api('openapi.yaml')
+    app.add_api("openapi.yaml")
 
     test_methods = set()
     for rule in app.app.url_map.iter_rules():
diff --git a/tests/api/test_errors.py b/tests/api/test_errors.py
index 1ad2a8f..1648c6e 100644
--- a/tests/api/test_errors.py
+++ b/tests/api/test_errors.py
@@ -10,79 +10,84 @@ def fix_data(data):
 def test_errors(problem_app):
     app_client = problem_app.app.test_client()
 
-    greeting404 = app_client.get('/v1.0/greeting')  # type: flask.Response
-    assert greeting404.content_type == 'application/problem+json'
+    greeting404 = app_client.get("/v1.0/greeting")  # type: flask.Response
+    assert greeting404.content_type == "application/problem+json"
     assert greeting404.status_code == 404
     error404 = flask.json.loads(fix_data(greeting404.data))
-    assert error404['type'] == 'about:blank'
-    assert error404['title'] == 'Not Found'
-    assert error404['detail'] == 'The requested URL was not found on the server. ' \
-                                 'If you entered the URL manually please check your spelling and try again.'
-    assert error404['status'] == 404
-    assert 'instance' not in error404
+    assert error404["type"] == "about:blank"
+    assert error404["title"] == "Not Found"
+    assert (
+        error404["detail"] == "The requested URL was not found on the server. "
+        "If you entered the URL manually please check your spelling and try again."
+    )
+    assert error404["status"] == 404
+    assert "instance" not in error404
 
-    get_greeting = app_client.get('/v1.0/greeting/jsantos')  # type: flask.Response
-    assert get_greeting.content_type == 'application/problem+json'
+    get_greeting = app_client.get("/v1.0/greeting/jsantos")  # type: flask.Response
+    assert get_greeting.content_type == "application/problem+json"
     assert get_greeting.status_code == 405
-    error405 = json.loads(get_greeting.data.decode('utf-8', 'replace'))
-    assert error405['type'] == 'about:blank'
-    assert error405['title'] == 'Method Not Allowed'
-    assert error405['detail'] == 'The method is not allowed for the requested URL.'
-    assert error405['status'] == 405
-    assert 'instance' not in error405
+    error405 = json.loads(get_greeting.data.decode("utf-8", "replace"))
+    assert error405["type"] == "about:blank"
+    assert error405["title"] == "Method Not Allowed"
+    assert error405["detail"] == "The method is not allowed for the requested URL."
+    assert error405["status"] == 405
+    assert "instance" not in error405
 
-    get500 = app_client.get('/v1.0/except')  # type: flask.Response
-    assert get500.content_type == 'application/problem+json'
+    get500 = app_client.get("/v1.0/except")  # type: flask.Response
+    assert get500.content_type == "application/problem+json"
     assert get500.status_code == 500
-    error500 = json.loads(get500.data.decode('utf-8', 'replace'))
-    assert error500['type'] == 'about:blank'
-    assert error500['title'] == 'Internal Server Error'
-    assert error500['detail'] == 'The server encountered an internal error and was unable to complete your request. ' \
-                                 'Either the server is overloaded or there is an error in the application.'
-    assert error500['status'] == 500
-    assert 'instance' not in error500
+    error500 = json.loads(get500.data.decode("utf-8", "replace"))
+    assert error500["type"] == "about:blank"
+    assert error500["title"] == "Internal Server Error"
+    assert (
+        error500["detail"] == "The server encountered an internal error and was unable to complete your request. "
+        "Either the server is overloaded or there is an error in the application."
+    )
+    assert error500["status"] == 500
+    assert "instance" not in error500
 
-    get_problem = app_client.get('/v1.0/problem')  # type: flask.Response
-    assert get_problem.content_type == 'application/problem+json'
+    get_problem = app_client.get("/v1.0/problem")  # type: flask.Response
+    assert get_problem.content_type == "application/problem+json"
     assert get_problem.status_code == 418
-    assert get_problem.headers['x-Test-Header'] == 'In Test'
-    error_problem = json.loads(get_problem.data.decode('utf-8', 'replace'))
-    assert error_problem['type'] == 'http://www.example.com/error'
-    assert error_problem['title'] == 'Some Error'
-    assert error_problem['detail'] == 'Something went wrong somewhere'
-    assert error_problem['status'] == 418
-    assert error_problem['instance'] == 'instance1'
+    assert get_problem.headers["x-Test-Header"] == "In Test"
+    error_problem = json.loads(get_problem.data.decode("utf-8", "replace"))
+    assert error_problem["type"] == "http://www.example.com/error"
+    assert error_problem["title"] == "Some Error"
+    assert error_problem["detail"] == "Something went wrong somewhere"
+    assert error_problem["status"] == 418
+    assert error_problem["instance"] == "instance1"
 
-    get_problem2 = app_client.get('/v1.0/other_problem')  # type: flask.Response
-    assert get_problem2.content_type == 'application/problem+json'
+    get_problem2 = app_client.get("/v1.0/other_problem")  # type: flask.Response
+    assert get_problem2.content_type == "application/problem+json"
     assert get_problem2.status_code == 418
-    error_problem2 = json.loads(get_problem2.data.decode('utf-8', 'replace'))
-    assert error_problem2['type'] == 'about:blank'
-    assert error_problem2['title'] == 'Some Error'
-    assert error_problem2['detail'] == 'Something went wrong somewhere'
-    assert error_problem2['status'] == 418
-    assert error_problem2['instance'] == 'instance1'
+    error_problem2 = json.loads(get_problem2.data.decode("utf-8", "replace"))
+    assert error_problem2["type"] == "about:blank"
+    assert error_problem2["title"] == "Some Error"
+    assert error_problem2["detail"] == "Something went wrong somewhere"
+    assert error_problem2["status"] == 418
+    assert error_problem2["instance"] == "instance1"
 
-    problematic_json = app_client.get(
-        '/v1.0/json_response_with_undefined_value_to_serialize')  # type: flask.Response
+    problematic_json = app_client.get("/v1.0/json_response_with_undefined_value_to_serialize")  # type: flask.Response
     assert problematic_json.status_code == 500
 
-    custom_problem = app_client.get('/v1.0/customized_problem_response')
+    custom_problem = app_client.get("/v1.0/customized_problem_response")
     assert custom_problem.status_code == 403
-    problem_body = json.loads(custom_problem.data.decode('utf-8', 'replace'))
-    assert 'amount' in problem_body
-    assert problem_body['amount'] == 23.
+    problem_body = json.loads(custom_problem.data.decode("utf-8", "replace"))
+    assert "amount" in problem_body
+    assert problem_body["amount"] == 23.0
 
-    problem_as_exception = app_client.get('/v1.0/problem_exception_with_extra_args')
+    problem_as_exception = app_client.get("/v1.0/problem_exception_with_extra_args")
     assert problem_as_exception.status_code == 400
-    problem_as_exception_body = json.loads(problem_as_exception.data.decode('utf-8', 'replace'))
-    assert 'age' in problem_as_exception_body
-    assert problem_as_exception_body['age'] == 30
+    problem_as_exception_body = json.loads(problem_as_exception.data.decode("utf-8", "replace"))
+    assert "age" in problem_as_exception_body
+    assert problem_as_exception_body["age"] == 30
 
-    unsupported_media_type = app_client.post('/v1.0/post_wrong_content_type', data='<html></html>', content_type='text/html')
+    unsupported_media_type = app_client.post(
+        "/v1.0/post_wrong_content_type", data="<html></html>", content_type="text/html"
+    )
     assert unsupported_media_type.status_code == 415
-    unsupported_media_type_body = json.loads(unsupported_media_type.data.decode('utf-8', 'replace'))
-    assert unsupported_media_type_body['type'] == 'about:blank'
-    assert unsupported_media_type_body['title'] == 'Unsupported Media Type'
-    assert unsupported_media_type_body['detail'] == 'Invalid Content-type (text/html), expected JSON data'
-    assert unsupported_media_type_body['status'] == 415
+    unsupported_media_type_body = json.loads(unsupported_media_type.data.decode("utf-8", "replace"))
+    assert unsupported_media_type_body["type"] == "about:blank"
+    assert unsupported_media_type_body["title"] == "Unsupported Media Type"
+    assert unsupported_media_type_body["detail"] == "Invalid Content-type (text/html), expected JSON data"
+    assert unsupported_media_type_body["status"] == 415
diff --git a/tests/api/test_headers.py b/tests/api/test_headers.py
index 87cdafa..a75bfe7 100644
--- a/tests/api/test_headers.py
+++ b/tests/api/test_headers.py
@@ -4,7 +4,7 @@
 def test_headers_jsonifier(simple_app):
     app_client = simple_app.app.test_client()
 
-    response = app_client.post('/v1.0/goodday/dan', data={})  # type: flask.Response
+    response = app_client.post("/v1.0/goodday/dan", data={})  # type: flask.Response
     assert response.status_code == 201
     # Default Werkzeug behavior was changed in 2.1 (https://github.com/pallets/werkzeug/issues/2352)
     assert response.headers["Location"] in ["http://localhost/my/uri", "/my/uri"]
@@ -13,7 +13,7 @@ def test_headers_jsonifier(simple_app):
 def test_headers_produces(simple_app):
     app_client = simple_app.app.test_client()
 
-    response = app_client.post('/v1.0/goodevening/dan', data={})  # type: flask.Response
+    response = app_client.post("/v1.0/goodevening/dan", data={})  # type: flask.Response
     assert response.status_code == 201
     # Default Werkzeug behavior was changed in 2.1 (https://github.com/pallets/werkzeug/issues/2352)
     assert response.headers["Location"] in ["http://localhost/my/uri", "/my/uri"]
@@ -22,32 +22,32 @@ def test_headers_produces(simple_app):
 def test_header_not_returned(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.post('/v1.0/goodday/noheader', data={})  # type: flask.Response
+    response = app_client.post("/v1.0/goodday/noheader", data={})  # type: flask.Response
     assert response.status_code == 500  # view_func has not returned what was promised in spec
-    assert response.content_type == 'application/problem+json'
-    data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert data['type'] == 'about:blank'
-    assert data['title'] == 'Response headers do not conform to specification'
-    assert data['detail'] == "Keys in header don't match response specification. Difference: Location"
-    assert data['status'] == 500
+    assert response.content_type == "application/problem+json"
+    data = json.loads(response.data.decode("utf-8", "replace"))
+    assert data["type"] == "about:blank"
+    assert data["title"] == "Response headers do not conform to specification"
+    assert data["detail"] == "Keys in header don't match response specification. Difference: Location"
+    assert data["status"] == 500
 
 
 def test_no_content_response_have_headers(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-204-with-headers')
+    resp = app_client.get("/v1.0/test-204-with-headers")
     assert resp.status_code == 204
-    assert 'X-Something' in resp.headers
+    assert "X-Something" in resp.headers
 
 
 def test_no_content_object_and_have_headers(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-204-with-headers-nocontent-obj')
+    resp = app_client.get("/v1.0/test-204-with-headers-nocontent-obj")
     assert resp.status_code == 204
-    assert 'X-Something' in resp.headers
+    assert "X-Something" in resp.headers
 
 
 def test_optional_header(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
-    resp = app_client.get('/v1.0/test-optional-headers')
+    resp = app_client.get("/v1.0/test-optional-headers")
     assert resp.status_code == 200
-    assert 'X-Optional-Header' not in resp.headers
+    assert "X-Optional-Header" not in resp.headers
diff --git a/tests/api/test_parameters.py b/tests/api/test_parameters.py
index 7f0ae13..87f992b 100644
--- a/tests/api/test_parameters.py
+++ b/tests/api/test_parameters.py
@@ -8,507 +8,510 @@
 def test_parameter_validation(simple_app):
     app_client = simple_app.app.test_client()
 
-    url = '/v1.0/test_parameter_validation'
+    url = "/v1.0/test_parameter_validation"
 
-    response = app_client.get(url, query_string={'date': '2015-08-26'})  # type: flask.Response
+    response = app_client.get(url, query_string={"date": "2015-08-26"})  # type: flask.Response
     assert response.status_code == 200
 
-    for invalid_int in '', 'foo', '0.1':
-        response = app_client.get(url, query_string={'int': invalid_int})  # type: flask.Response
+    for invalid_int in "", "foo", "0.1":
+        response = app_client.get(url, query_string={"int": invalid_int})  # type: flask.Response
         assert response.status_code == 400
 
-    response = app_client.get(url, query_string={'int': '123'})  # type: flask.Response
+    response = app_client.get(url, query_string={"int": "123"})  # type: flask.Response
     assert response.status_code == 200
 
-    for invalid_bool in '', 'foo', 'yes':
-        response = app_client.get(url, query_string={'bool': invalid_bool})  # type: flask.Response
+    for invalid_bool in "", "foo", "yes":
+        response = app_client.get(url, query_string={"bool": invalid_bool})  # type: flask.Response
         assert response.status_code == 400
 
-    response = app_client.get(url, query_string={'bool': 'true'})  # type: flask.Response
+    response = app_client.get(url, query_string={"bool": "true"})  # type: flask.Response
     assert response.status_code == 200
 
 
 def test_required_query_param(simple_app):
     app_client = simple_app.app.test_client()
 
-    url = '/v1.0/test_required_query_param'
+    url = "/v1.0/test_required_query_param"
     response = app_client.get(url)
     assert response.status_code == 400
 
-    response = app_client.get(url, query_string={'n': '1.23'})
+    response = app_client.get(url, query_string={"n": "1.23"})
     assert response.status_code == 200
 
 
 def test_array_query_param(simple_app):
     app_client = simple_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
-    url = '/v1.0/test_array_csv_query_param'
+    headers = {"Content-type": "application/json"}
+    url = "/v1.0/test_array_csv_query_param"
     response = app_client.get(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))
-    assert array_response == ['squash', 'banana']
-    url = '/v1.0/test_array_csv_query_param?items=one,two,three'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))
+    assert array_response == ["squash", "banana"]
+    url = "/v1.0/test_array_csv_query_param?items=one,two,three"
     response = app_client.get(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))
-    assert array_response == ['one', 'two', 'three']
-    url = '/v1.0/test_array_pipes_query_param?items=1|2|3'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))
+    assert array_response == ["one", "two", "three"]
+    url = "/v1.0/test_array_pipes_query_param?items=1|2|3"
     response = app_client.get(url, headers=headers)
-    array_response: List[int] = json.loads(response.data.decode('utf-8', 'replace'))
+    array_response: List[int] = json.loads(response.data.decode("utf-8", "replace"))
     assert array_response == [1, 2, 3]
-    url = '/v1.0/test_array_unsupported_query_param?items=1;2;3'
+    url = "/v1.0/test_array_unsupported_query_param?items=1;2;3"
     response = app_client.get(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))  # unsupported collectionFormat
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))  # unsupported collectionFormat
     assert array_response == ["1;2;3"]
-    url = '/v1.0/test_array_csv_query_param?items=A&items=B&items=C&items=D,E,F'
+    url = "/v1.0/test_array_csv_query_param?items=A&items=B&items=C&items=D,E,F"
     response = app_client.get(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))  # multi array with csv format
-    assert array_response == ['D', 'E', 'F']
-    url = '/v1.0/test_array_multi_query_param?items=A&items=B&items=C&items=D,E,F'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))  # multi array with csv format
+    assert array_response == ["D", "E", "F"]
+    url = "/v1.0/test_array_multi_query_param?items=A&items=B&items=C&items=D,E,F"
     response = app_client.get(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))  # multi array with csv format
-    assert array_response == ['A', 'B', 'C', 'D', 'E', 'F']
-    url = '/v1.0/test_array_pipes_query_param?items=4&items=5&items=6&items=7|8|9'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))  # multi array with csv format
+    assert array_response == ["A", "B", "C", "D", "E", "F"]
+    url = "/v1.0/test_array_pipes_query_param?items=4&items=5&items=6&items=7|8|9"
     response = app_client.get(url, headers=headers)
-    array_response: List[int] = json.loads(response.data.decode('utf-8', 'replace'))  # multi array with pipes format
+    array_response: List[int] = json.loads(response.data.decode("utf-8", "replace"))  # multi array with pipes format
     assert array_response == [7, 8, 9]
 
 
 def test_array_form_param(simple_app):
     app_client = simple_app.app.test_client()
-    headers = {'Content-type': 'application/x-www-form-urlencoded'}
-    url = '/v1.0/test_array_csv_form_param'
+    headers = {"Content-type": "application/x-www-form-urlencoded"}
+    url = "/v1.0/test_array_csv_form_param"
     response = app_client.post(url, headers=headers)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))
-    assert array_response == ['squash', 'banana']
-    url = '/v1.0/test_array_csv_form_param'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))
+    assert array_response == ["squash", "banana"]
+    url = "/v1.0/test_array_csv_form_param"
     response = app_client.post(url, headers=headers, data={"items": "one,two,three"})
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))
-    assert array_response == ['one', 'two', 'three']
-    url = '/v1.0/test_array_pipes_form_param'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))
+    assert array_response == ["one", "two", "three"]
+    url = "/v1.0/test_array_pipes_form_param"
     response = app_client.post(url, headers=headers, data={"items": "1|2|3"})
-    array_response: List[int] = json.loads(response.data.decode('utf-8', 'replace'))
+    array_response: List[int] = json.loads(response.data.decode("utf-8", "replace"))
     assert array_response == [1, 2, 3]
-    url = '/v1.0/test_array_csv_form_param'
-    data = 'items=A&items=B&items=C&items=D,E,F'
+    url = "/v1.0/test_array_csv_form_param"
+    data = "items=A&items=B&items=C&items=D,E,F"
     response = app_client.post(url, headers=headers, data=data)
-    array_response: List[str] = json.loads(response.data.decode('utf-8', 'replace'))  # multi array with csv format
-    assert array_response == ['D', 'E', 'F']
-    url = '/v1.0/test_array_pipes_form_param'
-    data = 'items=4&items=5&items=6&items=7|8|9'
+    array_response: List[str] = json.loads(response.data.decode("utf-8", "replace"))  # multi array with csv format
+    assert array_response == ["D", "E", "F"]
+    url = "/v1.0/test_array_pipes_form_param"
+    data = "items=4&items=5&items=6&items=7|8|9"
     response = app_client.post(url, headers=headers, data=data)
-    array_response: List[int] = json.loads(response.data.decode('utf-8', 'replace'))  # multi array with pipes format
+    array_response: List[int] = json.loads(response.data.decode("utf-8", "replace"))  # multi array with pipes format
     assert array_response == [7, 8, 9]
 
 
 def test_extra_query_param(simple_app):
     app_client = simple_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
-    url = '/v1.0/test_parameter_validation?extra_parameter=true'
+    headers = {"Content-type": "application/json"}
+    url = "/v1.0/test_parameter_validation?extra_parameter=true"
     resp = app_client.get(url, headers=headers)
     assert resp.status_code == 200
 
 
 def test_strict_extra_query_param(strict_app):
     app_client = strict_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
-    url = '/v1.0/test_parameter_validation?extra_parameter=true'
+    headers = {"Content-type": "application/json"}
+    url = "/v1.0/test_parameter_validation?extra_parameter=true"
     resp = app_client.get(url, headers=headers)
     assert resp.status_code == 400
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['detail'] == "Extra query parameter(s) extra_parameter not in spec"
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["detail"] == "Extra query parameter(s) extra_parameter not in spec"
 
 
 def test_strict_formdata_param(strict_app):
     app_client = strict_app.app.test_client()
-    headers = {'Content-type': 'application/x-www-form-urlencoded'}
-    url = '/v1.0/test_array_csv_form_param'
-    resp = app_client.post(url, headers=headers, data={"items":"mango"})
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response == ['mango']
-    assert resp.status_code == 200
-
-
-@pytest.mark.parametrize('arg, result', [
-    # The cases accepted by the Flask/Werkzeug converter
-    ['123', 'int 123'],
-    ['0', 'int 0'],
-    ['0000', 'int 0'],
-    # Additional cases that we want to support
-    ['+123', 'int 123'],
-    ['+0', 'int 0'],
-    ['-0', 'int 0'],
-    ['-123', 'int -123'],
-])
+    headers = {"Content-type": "application/x-www-form-urlencoded"}
+    url = "/v1.0/test_array_csv_form_param"
+    resp = app_client.post(url, headers=headers, data={"items": "mango"})
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response == ["mango"]
+    assert resp.status_code == 200
+
+
+@pytest.mark.parametrize(
+    "arg, result",
+    [
+        # The cases accepted by the Flask/Werkzeug converter
+        ["123", "int 123"],
+        ["0", "int 0"],
+        ["0000", "int 0"],
+        # Additional cases that we want to support
+        ["+123", "int 123"],
+        ["+0", "int 0"],
+        ["-0", "int 0"],
+        ["-123", "int -123"],
+    ],
+)
 def test_path_parameter_someint(simple_app, arg, result):
     assert isinstance(arg, str)  # sanity check
     app_client = simple_app.app.test_client()
-    resp = app_client.get(f'/v1.0/test-int-path/{arg}')  # type: flask.Response
-    assert resp.data.decode('utf-8', 'replace') == f'"{result}"\n'
+    resp = app_client.get(f"/v1.0/test-int-path/{arg}")  # type: flask.Response
+    assert resp.data.decode("utf-8", "replace") == f'"{result}"\n'
 
 
 def test_path_parameter_someint__bad(simple_app):
     # non-integer values will not match Flask route
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-int-path/foo')  # type: flask.Response
+    resp = app_client.get("/v1.0/test-int-path/foo")  # type: flask.Response
     assert resp.status_code == 404
 
 
-@pytest.mark.parametrize('arg, result', [
-    # The cases accepted by the Flask/Werkzeug converter
-    ['123.45', 'float 123.45'],
-    ['123.0', 'float 123'],
-    ['0.999999999999999999', 'float 1'],
-    # Additional cases that we want to support
-    ['+123.45', 'float 123.45'],
-    ['-123.45', 'float -123.45'],
-    ['123.', 'float 123'],
-    ['.45', 'float 0.45'],
-    ['123', 'float 123'],
-    ['0', 'float 0'],
-    ['0000', 'float 0'],
-    ['-0.000000001', 'float -1e-09'],
-    ['100000000000', 'float 1e+11'],
-])
+@pytest.mark.parametrize(
+    "arg, result",
+    [
+        # The cases accepted by the Flask/Werkzeug converter
+        ["123.45", "float 123.45"],
+        ["123.0", "float 123"],
+        ["0.999999999999999999", "float 1"],
+        # Additional cases that we want to support
+        ["+123.45", "float 123.45"],
+        ["-123.45", "float -123.45"],
+        ["123.", "float 123"],
+        [".45", "float 0.45"],
+        ["123", "float 123"],
+        ["0", "float 0"],
+        ["0000", "float 0"],
+        ["-0.000000001", "float -1e-09"],
+        ["100000000000", "float 1e+11"],
+    ],
+)
 def test_path_parameter_somefloat(simple_app, arg, result):
     assert isinstance(arg, str)  # sanity check
     app_client = simple_app.app.test_client()
-    resp = app_client.get(f'/v1.0/test-float-path/{arg}')  # type: flask.Response
-    assert resp.data.decode('utf-8', 'replace') == f'"{result}"\n'
+    resp = app_client.get(f"/v1.0/test-float-path/{arg}")  # type: flask.Response
+    assert resp.data.decode("utf-8", "replace") == f'"{result}"\n'
 
 
 def test_path_parameter_somefloat__bad(simple_app):
     # non-float values will not match Flask route
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-float-path/123,45')  # type: flask.Response
+    resp = app_client.get("/v1.0/test-float-path/123,45")  # type: flask.Response
     assert resp.status_code == 404
 
 
 def test_default_param(strict_app):
     app_client = strict_app.app.test_client()
-    resp = app_client.get('/v1.0/test-default-query-parameter')
+    resp = app_client.get("/v1.0/test-default-query-parameter")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['app_name'] == 'firetail'
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["app_name"] == "firetail"
 
 
 def test_falsy_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-falsy-param', query_string={'falsy': 0})
+    resp = app_client.get("/v1.0/test-falsy-param", query_string={"falsy": 0})
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response == 0
 
-    resp = app_client.get('/v1.0/test-falsy-param')
+    resp = app_client.get("/v1.0/test-falsy-param")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response == 1
 
 
 def test_formdata_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-param',
-                           data={'formData': 'test'})
+    resp = app_client.post("/v1.0/test-formData-param", data={"formData": "test"})
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response == 'test'
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response == "test"
 
 
 def test_formdata_bad_request(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-param')
+    resp = app_client.post("/v1.0/test-formData-param")
     assert resp.status_code == 400
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['detail'] in [
-        "Missing formdata parameter 'formData'",
-        "'formData' is a required property" # OAS3
-    ]
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["detail"] in ["Missing formdata parameter 'formData'", "'formData' is a required property"]  # OAS3
 
 
 def test_formdata_missing_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-missing-param',
-                           data={'missing_formData': 'test'})
+    resp = app_client.post("/v1.0/test-formData-missing-param", data={"missing_formData": "test"})
     assert resp.status_code == 200
 
 
 def test_formdata_extra_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-param',
-                           data={'formData': 'test',
-                                 'extra_formData': 'test'})
+    resp = app_client.post("/v1.0/test-formData-param", data={"formData": "test", "extra_formData": "test"})
     assert resp.status_code == 200
 
 
 def test_strict_formdata_extra_param(strict_app):
     app_client = strict_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-param',
-                           data={'formData': 'test',
-                                 'extra_formData': 'test'})
+    resp = app_client.post("/v1.0/test-formData-param", data={"formData": "test", "extra_formData": "test"})
     assert resp.status_code == 400
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['detail'] == "Extra formData parameter(s) extra_formData not in spec"
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["detail"] == "Extra formData parameter(s) extra_formData not in spec"
 
 
 def test_formdata_file_upload(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-file-upload',
-                           data={'formData': (BytesIO(b'file contents'), 'filename.txt')})
+    resp = app_client.post(
+        "/v1.0/test-formData-file-upload", data={"formData": (BytesIO(b"file contents"), "filename.txt")}
+    )
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response == {'filename.txt': 'file contents'}
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response == {"filename.txt": "file contents"}
 
 
 def test_formdata_file_upload_bad_request(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-file-upload')
+    resp = app_client.post("/v1.0/test-formData-file-upload")
     assert resp.status_code == 400
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['detail'] in [
-        "Missing formdata parameter 'formData'",
-        "'formData' is a required property" # OAS3
-    ]
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["detail"] in ["Missing formdata parameter 'formData'", "'formData' is a required property"]  # OAS3
 
 
 def test_formdata_file_upload_missing_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-formData-file-upload-missing-param',
-                           data={'missing_formData': (BytesIO(b'file contents'), 'example.txt')})
+    resp = app_client.post(
+        "/v1.0/test-formData-file-upload-missing-param",
+        data={"missing_formData": (BytesIO(b"file contents"), "example.txt")},
+    )
     assert resp.status_code == 200
 
 
 def test_body_not_allowed_additional_properties(simple_app):
     app_client = simple_app.app.test_client()
-    body = { 'body1': 'bodyString', 'additional_property': 'test1'}
+    body = {"body1": "bodyString", "additional_property": "test1"}
     resp = app_client.post(
-        '/v1.0/body-not-allowed-additional-properties',
+        "/v1.0/body-not-allowed-additional-properties",
         data=json.dumps(body),
-        headers={'Content-Type': 'application/json'})
+        headers={"Content-Type": "application/json"},
+    )
     assert resp.status_code == 400
 
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert 'Additional properties are not allowed' in response['detail']
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert "Additional properties are not allowed" in response["detail"]
+
 
 def test_bool_as_default_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-bool-param')
+    resp = app_client.get("/v1.0/test-bool-param")
     assert resp.status_code == 200
 
-    resp = app_client.get('/v1.0/test-bool-param', query_string={'thruthiness': True})
+    resp = app_client.get("/v1.0/test-bool-param", query_string={"thruthiness": True})
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response is True
 
 
 def test_bool_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-bool-param', query_string={'thruthiness': True})
+    resp = app_client.get("/v1.0/test-bool-param", query_string={"thruthiness": True})
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response is True
 
-    resp = app_client.get('/v1.0/test-bool-param', query_string={'thruthiness': False})
+    resp = app_client.get("/v1.0/test-bool-param", query_string={"thruthiness": False})
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response is False
 
 
 def test_bool_array_param(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-bool-array-param?thruthiness=true,true,true')
+    resp = app_client.get("/v1.0/test-bool-array-param?thruthiness=true,true,true")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response is True
 
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-bool-array-param?thruthiness=true,true,false')
+    resp = app_client.get("/v1.0/test-bool-array-param?thruthiness=true,true,false")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response is False
 
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-bool-array-param')
+    resp = app_client.get("/v1.0/test-bool-array-param")
     assert resp.status_code == 200
 
 
 def test_required_param_miss_config(simple_app):
     app_client = simple_app.app.test_client()
 
-    resp = app_client.get('/v1.0/test-required-param')
+    resp = app_client.get("/v1.0/test-required-param")
     assert resp.status_code == 400
 
-    resp = app_client.get('/v1.0/test-required-param', query_string={'simple': 'test'})
+    resp = app_client.get("/v1.0/test-required-param", query_string={"simple": "test"})
     assert resp.status_code == 200
 
-    resp = app_client.get('/v1.0/test-required-param')
+    resp = app_client.get("/v1.0/test-required-param")
     assert resp.status_code == 400
 
 
 def test_parameters_defined_in_path_level(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/parameters-in-root-path?title=nice-get')
+    resp = app_client.get("/v1.0/parameters-in-root-path?title=nice-get")
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == ["nice-get"]
+    assert json.loads(resp.data.decode("utf-8", "replace")) == ["nice-get"]
 
-    resp = app_client.get('/v1.0/parameters-in-root-path')
+    resp = app_client.get("/v1.0/parameters-in-root-path")
     assert resp.status_code == 400
 
 
 def test_array_in_path(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-array-in-path/one_item')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == ["one_item"]
+    resp = app_client.get("/v1.0/test-array-in-path/one_item")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == ["one_item"]
 
-    resp = app_client.get('/v1.0/test-array-in-path/one_item,another_item')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == ["one_item", "another_item"]
+    resp = app_client.get("/v1.0/test-array-in-path/one_item,another_item")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == ["one_item", "another_item"]
 
 
 def test_nullable_parameter(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/nullable-parameters?time_start=null')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.get("/v1.0/nullable-parameters?time_start=null")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
-    resp = app_client.get('/v1.0/nullable-parameters?time_start=None')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.get("/v1.0/nullable-parameters?time_start=None")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
     time_start = 1010
-    resp = app_client.get(
-        f'/v1.0/nullable-parameters?time_start={time_start}')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == time_start
+    resp = app_client.get(f"/v1.0/nullable-parameters?time_start={time_start}")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == time_start
 
-    resp = app_client.post('/v1.0/nullable-parameters', data={"post_param": 'None'})
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.post("/v1.0/nullable-parameters", data={"post_param": "None"})
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
-    resp = app_client.post('/v1.0/nullable-parameters', data={"post_param": 'null'})
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.post("/v1.0/nullable-parameters", data={"post_param": "null"})
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
     headers = {"Content-Type": "application/json"}
-    resp = app_client.put('/v1.0/nullable-parameters', data="null", headers=headers)
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.put("/v1.0/nullable-parameters", data="null", headers=headers)
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
-    resp = app_client.put('/v1.0/nullable-parameters', data="None", headers=headers)
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'it was None'
+    resp = app_client.put("/v1.0/nullable-parameters", data="None", headers=headers)
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "it was None"
 
-    resp = app_client.put('/v1.0/nullable-parameters-noargs', data="None", headers=headers)
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == 'hello'
+    resp = app_client.put("/v1.0/nullable-parameters-noargs", data="None", headers=headers)
+    assert json.loads(resp.data.decode("utf-8", "replace")) == "hello"
 
 
 def test_args_kwargs(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/query-params-as-kwargs')
+    resp = app_client.get("/v1.0/query-params-as-kwargs")
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == {}
+    assert json.loads(resp.data.decode("utf-8", "replace")) == {}
 
-    resp = app_client.get('/v1.0/query-params-as-kwargs?foo=a&bar=b')
+    resp = app_client.get("/v1.0/query-params-as-kwargs?foo=a&bar=b")
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == {'foo': 'a'}
+    assert json.loads(resp.data.decode("utf-8", "replace")) == {"foo": "a"}
 
-    if simple_app._spec_file == 'openapi.yaml':
-        body = { 'foo': 'a', 'bar': 'b' }
+    if simple_app._spec_file == "openapi.yaml":
+        body = {"foo": "a", "bar": "b"}
         resp = app_client.post(
-            '/v1.0/body-params-as-kwargs',
-            data=json.dumps(body),
-            headers={'Content-Type': 'application/json'})
+            "/v1.0/body-params-as-kwargs", data=json.dumps(body), headers={"Content-Type": "application/json"}
+        )
         assert resp.status_code == 200
         # having only kwargs, the handler would have been passed 'body'
-        assert json.loads(resp.data.decode('utf-8', 'replace')) == {'body': {'foo': 'a', 'bar': 'b'}, }
+        assert json.loads(resp.data.decode("utf-8", "replace")) == {
+            "body": {"foo": "a", "bar": "b"},
+        }
 
 
 def test_param_sanitization(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/param-sanitization')
+    resp = app_client.post("/v1.0/param-sanitization")
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == {}
+    assert json.loads(resp.data.decode("utf-8", "replace")) == {}
 
-    resp = app_client.post('/v1.0/param-sanitization?$query=queryString',
-            data={'$form': 'formString'})
+    resp = app_client.post("/v1.0/param-sanitization?$query=queryString", data={"$form": "formString"})
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == {
-            'query': 'queryString',
-            'form': 'formString',
-            }
+    assert json.loads(resp.data.decode("utf-8", "replace")) == {
+        "query": "queryString",
+        "form": "formString",
+    }
 
-    body = { 'body1': 'bodyString', 'body2': 'otherString' }
+    body = {"body1": "bodyString", "body2": "otherString"}
     resp = app_client.post(
-        '/v1.0/body-sanitization',
-        data=json.dumps(body),
-        headers={'Content-Type': 'application/json'})
+        "/v1.0/body-sanitization", data=json.dumps(body), headers={"Content-Type": "application/json"}
+    )
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == body
+    assert json.loads(resp.data.decode("utf-8", "replace")) == body
 
-    body = { 'body1': 'bodyString', 'body2': 12, 'body3': {'a':'otherString' }}
+    body = {"body1": "bodyString", "body2": 12, "body3": {"a": "otherString"}}
     resp = app_client.post(
-        '/v1.0/body-sanitization-additional-properties',
+        "/v1.0/body-sanitization-additional-properties",
         data=json.dumps(body),
-        headers={'Content-Type': 'application/json'})
+        headers={"Content-Type": "application/json"},
+    )
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == body
+    assert json.loads(resp.data.decode("utf-8", "replace")) == body
 
-    body = {'body1': 'bodyString', 'additional_property': 'test1', 'additional_property2': 'test2'}
+    body = {"body1": "bodyString", "additional_property": "test1", "additional_property2": "test2"}
     resp = app_client.post(
-        '/v1.0/body-sanitization-additional-properties-defined',
+        "/v1.0/body-sanitization-additional-properties-defined",
         data=json.dumps(body),
-        headers={'Content-Type': 'application/json'})
+        headers={"Content-Type": "application/json"},
+    )
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == body
+    assert json.loads(resp.data.decode("utf-8", "replace")) == body
+
 
 def test_no_sanitization_in_request_body(simple_app):
     app_client = simple_app.app.test_client()
     data = {
-        'name': 'John',
-        '$surname': 'Doe',
-        '1337': True,
-        '!#/bin/sh': False,
-        '(1/0)': 'division by zero',
-        's/$/EOL/': 'regular expression',
-        '@8am': 'time',
+        "name": "John",
+        "$surname": "Doe",
+        "1337": True,
+        "!#/bin/sh": False,
+        "(1/0)": "division by zero",
+        "s/$/EOL/": "regular expression",
+        "@8am": "time",
     }
-    response = app_client.post('/v1.0/forward', json=data)
+    response = app_client.post("/v1.0/forward", json=data)
 
     assert response.status_code == 200
     assert response.json == data
 
+
 def test_parameters_snake_case(snake_case_app):
     app_client = snake_case_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
-    resp = app_client.post('/v1.0/test-post-path-snake/123', headers=headers, data=json.dumps({"a": "test"}))
+    headers = {"Content-type": "application/json"}
+    resp = app_client.post("/v1.0/test-post-path-snake/123", headers=headers, data=json.dumps({"a": "test"}))
     assert resp.status_code == 200
-    resp = app_client.post('/v1.0/test-post-path-shadow/123', headers=headers, data=json.dumps({"a": "test"}))
+    resp = app_client.post("/v1.0/test-post-path-shadow/123", headers=headers, data=json.dumps({"a": "test"}))
     assert resp.status_code == 200
-    resp = app_client.post('/v1.0/test-post-query-snake?someId=123', headers=headers, data=json.dumps({"a": "test"}))
+    resp = app_client.post("/v1.0/test-post-query-snake?someId=123", headers=headers, data=json.dumps({"a": "test"}))
     assert resp.status_code == 200
-    resp = app_client.post('/v1.0/test-post-query-shadow?id=123&class=header', headers=headers, data=json.dumps({"a": "test"}))
+    resp = app_client.post(
+        "/v1.0/test-post-query-shadow?id=123&class=header", headers=headers, data=json.dumps({"a": "test"})
+    )
     assert resp.status_code == 200
-    resp = app_client.get('/v1.0/test-get-path-snake/123')
+    resp = app_client.get("/v1.0/test-get-path-snake/123")
     assert resp.status_code == 200
-    resp = app_client.get('/v1.0/test-get-path-shadow/123')
+    resp = app_client.get("/v1.0/test-get-path-shadow/123")
     assert resp.status_code == 200
-    resp = app_client.get('/v1.0/test-get-query-snake?someId=123')
+    resp = app_client.get("/v1.0/test-get-query-snake?someId=123")
     assert resp.status_code == 200
-    resp = app_client.get('/v1.0/test-get-query-shadow?list=123')
+    resp = app_client.get("/v1.0/test-get-query-shadow?list=123")
     assert resp.status_code == 200
     # Tests for when CamelCase parameter is supplied, of which the snake_case version
     # matches an existing parameter and view func argument, or vice versa
-    resp = app_client.get('/v1.0/test-get-camel-case-version?truthiness=true&orderBy=asc')
+    resp = app_client.get("/v1.0/test-get-camel-case-version?truthiness=true&orderBy=asc")
     assert resp.status_code == 200
-    assert resp.get_json() == {'truthiness': True, 'order_by': 'asc'}
-    resp = app_client.get('/v1.0/test-get-camel-case-version?truthiness=5')
+    assert resp.get_json() == {"truthiness": True, "order_by": "asc"}
+    resp = app_client.get("/v1.0/test-get-camel-case-version?truthiness=5")
     assert resp.status_code == 400
-    assert resp.get_json()['detail'] == "Wrong type, expected 'boolean' for query parameter 'truthiness'"
+    assert resp.get_json()["detail"] == "Wrong type, expected 'boolean' for query parameter 'truthiness'"
     # Incorrectly cased params should be ignored
-    resp = app_client.get('/v1.0/test-get-camel-case-version?Truthiness=true&order_by=asc')
+    resp = app_client.get("/v1.0/test-get-camel-case-version?Truthiness=true&order_by=asc")
     assert resp.status_code == 200
-    assert resp.get_json() == {'truthiness': False, 'order_by': None}  # default values
-    resp = app_client.get('/v1.0/test-get-camel-case-version?Truthiness=5&order_by=4')
+    assert resp.get_json() == {"truthiness": False, "order_by": None}  # default values
+    resp = app_client.get("/v1.0/test-get-camel-case-version?Truthiness=5&order_by=4")
     assert resp.status_code == 200
-    assert resp.get_json() == {'truthiness': False, 'order_by': None}  # default values
+    assert resp.get_json() == {"truthiness": False, "order_by": None}  # default values
     # TODO: Add tests for body parameters
 
 
 def test_get_unicode_request(simple_app):
     """Regression test for Python 2 UnicodeEncodeError bug during parameter parsing."""
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_unicode_request?price=%C2%A319.99')  # £19.99
+    resp = app_client.get("/v1.0/get_unicode_request?price=%C2%A319.99")  # £19.99
     assert resp.status_code == 200
-    assert json.loads(resp.data.decode('utf-8'))['price'] == '£19.99'
+    assert json.loads(resp.data.decode("utf-8"))["price"] == "£19.99"
 
 
 def test_cookie_param(simple_app):
diff --git a/tests/api/test_responses.py b/tests/api/test_responses.py
index a3157d9..4422ada 100644
--- a/tests/api/test_responses.py
+++ b/tests/api/test_responses.py
@@ -12,114 +12,109 @@ def test_app(simple_app):
     app_client = simple_app.app.test_client()
 
     # by default the Swagger UI is enabled
-    swagger_ui = app_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui = app_client.get("/v1.0/ui/")  # type: flask.Response
 
     assert swagger_ui.status_code == 200
     assert b"Swagger UI" in swagger_ui.data
 
     # test return Swagger UI static files
-    swagger_icon = app_client.get('/v1.0/ui/swagger-ui.js')  # type: flask.Response
+    swagger_icon = app_client.get("/v1.0/ui/swagger-ui.js")  # type: flask.Response
     assert swagger_icon.status_code == 200
 
-    post_greeting_url = app_client.post('/v1.0/greeting/jsantos/the/third/of/his/name', data={})  # type: flask.Response
+    post_greeting_url = app_client.post("/v1.0/greeting/jsantos/the/third/of/his/name", data={})  # type: flask.Response
     assert post_greeting_url.status_code == 200
-    assert post_greeting_url.content_type == 'application/json'
-    greeting_response_url = json.loads(post_greeting_url.data.decode('utf-8'))
-    assert greeting_response_url['greeting'] == 'Hello jsantos thanks for the/third/of/his/name'
+    assert post_greeting_url.content_type == "application/json"
+    greeting_response_url = json.loads(post_greeting_url.data.decode("utf-8"))
+    assert greeting_response_url["greeting"] == "Hello jsantos thanks for the/third/of/his/name"
 
-    post_greeting = app_client.post('/v1.0/greeting/jsantos', data={})  # type: flask.Response
+    post_greeting = app_client.post("/v1.0/greeting/jsantos", data={})  # type: flask.Response
     assert post_greeting.status_code == 200
-    assert post_greeting.content_type == 'application/json'
-    greeting_response = json.loads(post_greeting.data.decode('utf-8'))
-    assert greeting_response['greeting'] == 'Hello jsantos'
+    assert post_greeting.content_type == "application/json"
+    greeting_response = json.loads(post_greeting.data.decode("utf-8"))
+    assert greeting_response["greeting"] == "Hello jsantos"
 
-    get_bye = app_client.get('/v1.0/bye/jsantos')  # type: flask.Response
+    get_bye = app_client.get("/v1.0/bye/jsantos")  # type: flask.Response
     assert get_bye.status_code == 200
-    assert get_bye.data == b'Goodbye jsantos'
+    assert get_bye.data == b"Goodbye jsantos"
 
-    post_greeting = app_client.post('/v1.0/greeting/jsantos', data={})  # type: flask.Response
+    post_greeting = app_client.post("/v1.0/greeting/jsantos", data={})  # type: flask.Response
     assert post_greeting.status_code == 200
-    assert post_greeting.content_type == 'application/json'
-    greeting_response = json.loads(post_greeting.data.decode('utf-8'))
-    assert greeting_response['greeting'] == 'Hello jsantos'
+    assert post_greeting.content_type == "application/json"
+    greeting_response = json.loads(post_greeting.data.decode("utf-8"))
+    assert greeting_response["greeting"] == "Hello jsantos"
 
 
 def test_openapi_yaml_behind_proxy(reverse_proxied_app):
-    """ Verify the swagger.json file is returned with base_path updated
-        according to X-Original-URI header.
+    """Verify the swagger.json file is returned with base_path updated
+    according to X-Original-URI header.
     """
     app_client = reverse_proxied_app.app.test_client()
 
-    headers = {'X-Forwarded-Path': '/behind/proxy'}
+    headers = {"X-Forwarded-Path": "/behind/proxy"}
 
-    swagger_ui = app_client.get('/v1.0/ui/', headers=headers)
+    swagger_ui = app_client.get("/v1.0/ui/", headers=headers)
     assert swagger_ui.status_code == 200
 
-    openapi_yaml = app_client.get(
-        '/v1.0/' + reverse_proxied_app._spec_file,
-        headers=headers
-    )
+    openapi_yaml = app_client.get("/v1.0/" + reverse_proxied_app._spec_file, headers=headers)
     assert openapi_yaml.status_code == 200
-    assert openapi_yaml.headers.get('Content-Type') == 'text/yaml'
-    spec = yaml.load(openapi_yaml.data.decode('utf-8'), Loader=yaml.BaseLoader)
+    assert openapi_yaml.headers.get("Content-Type") == "text/yaml"
+    spec = yaml.load(openapi_yaml.data.decode("utf-8"), Loader=yaml.BaseLoader)
 
-    if reverse_proxied_app._spec_file == 'swagger.yaml':
+    if reverse_proxied_app._spec_file == "swagger.yaml":
         assert b'url = "/behind/proxy/v1.0/swagger.json"' in swagger_ui.data
-        assert spec.get('basePath') == '/behind/proxy/v1.0', \
-            "basePath should contains original URI"
+        assert spec.get("basePath") == "/behind/proxy/v1.0", "basePath should contains original URI"
     else:
         assert b'url: "/behind/proxy/v1.0/openapi.json"' in swagger_ui.data
-        url = spec.get('servers', [{}])[0].get('url')
-        assert url == '/behind/proxy/v1.0', \
-            "basePath should contains original URI"
+        url = spec.get("servers", [{}])[0].get("url")
+        assert url == "/behind/proxy/v1.0", "basePath should contains original URI"
 
 
 def test_produce_decorator(simple_app):
     app_client = simple_app.app.test_client()
 
-    get_bye = app_client.get('/v1.0/bye/jsantos')  # type: flask.Response
-    assert get_bye.content_type == 'text/plain; charset=utf-8'
+    get_bye = app_client.get("/v1.0/bye/jsantos")  # type: flask.Response
+    assert get_bye.content_type == "text/plain; charset=utf-8"
 
 
 def test_returning_flask_response_tuple(simple_app):
     app_client = simple_app.app.test_client()
 
-    result = app_client.get('/v1.0/flask_response_tuple')  # type: flask.Response
+    result = app_client.get("/v1.0/flask_response_tuple")  # type: flask.Response
     assert result.status_code == 201
-    assert result.content_type == 'application/json'
-    result_data = json.loads(result.data.decode('utf-8', 'replace'))
-    assert result_data == {'foo': 'bar'}
+    assert result.content_type == "application/json"
+    result_data = json.loads(result.data.decode("utf-8", "replace"))
+    assert result_data == {"foo": "bar"}
 
 
 def test_jsonifier(simple_app):
     app_client = simple_app.app.test_client()
 
-    post_greeting = app_client.post('/v1.0/greeting/jsantos', data={})  # type: flask.Response
+    post_greeting = app_client.post("/v1.0/greeting/jsantos", data={})  # type: flask.Response
     assert post_greeting.status_code == 200
-    assert post_greeting.content_type == 'application/json'
-    greeting_reponse = json.loads(post_greeting.data.decode('utf-8', 'replace'))
-    assert greeting_reponse['greeting'] == 'Hello jsantos'
+    assert post_greeting.content_type == "application/json"
+    greeting_reponse = json.loads(post_greeting.data.decode("utf-8", "replace"))
+    assert greeting_reponse["greeting"] == "Hello jsantos"
 
-    get_list_greeting = app_client.get('/v1.0/list/jsantos', data={})  # type: flask.Response
+    get_list_greeting = app_client.get("/v1.0/list/jsantos", data={})  # type: flask.Response
     assert get_list_greeting.status_code == 200
-    assert get_list_greeting.content_type == 'application/json'
-    greeting_reponse = json.loads(get_list_greeting.data.decode('utf-8', 'replace'))
+    assert get_list_greeting.content_type == "application/json"
+    greeting_reponse = json.loads(get_list_greeting.data.decode("utf-8", "replace"))
     assert len(greeting_reponse) == 2
-    assert greeting_reponse[0] == 'hello'
-    assert greeting_reponse[1] == 'jsantos'
+    assert greeting_reponse[0] == "hello"
+    assert greeting_reponse[1] == "jsantos"
 
-    get_greetings = app_client.get('/v1.0/greetings/jsantos', data={})  # type: flask.Response
+    get_greetings = app_client.get("/v1.0/greetings/jsantos", data={})  # type: flask.Response
     assert get_greetings.status_code == 200
-    assert get_greetings.content_type == 'application/x.firetail+json'
-    greetings_reponse = json.loads(get_greetings.data.decode('utf-8', 'replace'))
+    assert get_greetings.content_type == "application/x.firetail+json"
+    greetings_reponse = json.loads(get_greetings.data.decode("utf-8", "replace"))
     assert len(greetings_reponse) == 1
-    assert greetings_reponse['greetings'] == 'Hello jsantos'
+    assert greetings_reponse["greetings"] == "Hello jsantos"
 
 
 def test_not_content_response(simple_app):
     app_client = simple_app.app.test_client()
 
-    get_no_content_response = app_client.get('/v1.0/test_no_content_response')
+    get_no_content_response = app_client.get("/v1.0/test_no_content_response")
     assert get_no_content_response.status_code == 204
     assert get_no_content_response.content_length is None
 
@@ -127,14 +122,14 @@ def test_not_content_response(simple_app):
 def test_pass_through(simple_app):
     app_client = simple_app.app.test_client()
 
-    response = app_client.get('/v1.0/multimime', data={})  # type: flask.Response
+    response = app_client.get("/v1.0/multimime", data={})  # type: flask.Response
     assert response.status_code == 200
 
 
 def test_empty(simple_app):
     app_client = simple_app.app.test_client()
 
-    response = app_client.get('/v1.0/empty')  # type: flask.Response
+    response = app_client.get("/v1.0/empty")  # type: flask.Response
     assert response.status_code == 204
     assert not response.data
 
@@ -142,107 +137,114 @@ def test_empty(simple_app):
 def test_exploded_deep_object_param_endpoint_openapi_simple(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/exploded-deep-object-param?id[foo]=bar')  # type: flask.Response
+    response = app_client.get("/v1.0/exploded-deep-object-param?id[foo]=bar")  # type: flask.Response
     assert response.status_code == 200
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data == {'foo': 'bar', 'foo4': 'blubb'}
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data == {"foo": "bar", "foo4": "blubb"}
 
 
 def test_exploded_deep_object_param_endpoint_openapi_multiple_data_types(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/exploded-deep-object-param?id[foo]=bar&id[fooint]=2&id[fooboo]=false')  # type: flask.Response
+    response = app_client.get(
+        "/v1.0/exploded-deep-object-param?id[foo]=bar&id[fooint]=2&id[fooboo]=false"
+    )  # type: flask.Response
     assert response.status_code == 200
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data == {'foo': 'bar', 'fooint': 2, 'fooboo': False, 'foo4': 'blubb'}
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data == {"foo": "bar", "fooint": 2, "fooboo": False, "foo4": "blubb"}
 
 
 def test_exploded_deep_object_param_endpoint_openapi_additional_properties(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/exploded-deep-object-param-additional-properties?id[foo]=bar&id[fooint]=2')  # type: flask.Response
+    response = app_client.get(
+        "/v1.0/exploded-deep-object-param-additional-properties?id[foo]=bar&id[fooint]=2"
+    )  # type: flask.Response
     assert response.status_code == 200
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data == {'foo': 'bar', 'fooint': '2'}
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data == {"foo": "bar", "fooint": "2"}
 
 
 def test_exploded_deep_object_param_endpoint_openapi_additional_properties_false(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/exploded-deep-object-param?id[foo]=bar&id[foofoo]=barbar')  # type: flask.Response
+    response = app_client.get("/v1.0/exploded-deep-object-param?id[foo]=bar&id[foofoo]=barbar")  # type: flask.Response
     assert response.status_code == 400
 
 
 def test_exploded_deep_object_param_endpoint_openapi_with_dots(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/exploded-deep-object-param-additional-properties?id[foo]=bar&id[foo.foo]=barbar')  # type: flask.Response
+    response = app_client.get(
+        "/v1.0/exploded-deep-object-param-additional-properties?id[foo]=bar&id[foo.foo]=barbar"
+    )  # type: flask.Response
     assert response.status_code == 200
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data == {'foo': 'bar', 'foo.foo': 'barbar'}
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data == {"foo": "bar", "foo.foo": "barbar"}
 
 
 def test_nested_exploded_deep_object_param_endpoint_openapi(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    response = app_client.get('/v1.0/nested-exploded-deep-object-param?id[foo][foo2]=bar&id[foofoo]=barbar')  # type: flask.Response
+    response = app_client.get(
+        "/v1.0/nested-exploded-deep-object-param?id[foo][foo2]=bar&id[foofoo]=barbar"
+    )  # type: flask.Response
     assert response.status_code == 200
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data == {'foo': {'foo2': 'bar', 'foo3': 'blubb'}, 'foofoo': 'barbar'}
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data == {"foo": {"foo2": "bar", "foo3": "blubb"}, "foofoo": "barbar"}
 
 
 def test_redirect_endpoint(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-redirect-endpoint')
+    resp = app_client.get("/v1.0/test-redirect-endpoint")
     assert resp.status_code == 302
 
 
 def test_redirect_response_endpoint(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/test-redirect-response-endpoint')
+    resp = app_client.get("/v1.0/test-redirect-response-endpoint")
     assert resp.status_code == 302
 
 
 def test_default_object_body(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/test-default-object-body')
+    resp = app_client.post("/v1.0/test-default-object-body")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['stack'] == {'image_version': 'default_image'}
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["stack"] == {"image_version": "default_image"}
 
-    resp = app_client.post('/v1.0/test-default-integer-body')
+    resp = app_client.post("/v1.0/test-default-integer-body")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response == 1
 
 
 def test_empty_object_body(simple_app):
     app_client = simple_app.app.test_client()
     resp = app_client.post(
-        '/v1.0/test-empty-object-body',
-        data=json.dumps({}),
-        headers={'Content-Type': 'application/json'})
+        "/v1.0/test-empty-object-body", data=json.dumps({}), headers={"Content-Type": "application/json"}
+    )
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['stack'] == {}
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["stack"] == {}
 
 
 def test_nested_additional_properties(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
     resp = app_client.post(
-        '/v1.0/test-nested-additional-properties',
+        "/v1.0/test-nested-additional-properties",
         data=json.dumps({"nested": {"object": True}}),
-        headers={'Content-Type': 'application/json'})
+        headers={"Content-Type": "application/json"},
+    )
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
+    response = json.loads(resp.data.decode("utf-8", "replace"))
     assert response == {"nested": {"object": True}}
 
 
 def test_custom_encoder(simple_app):
-
     class CustomEncoder(FlaskJSONEncoder):
         def default(self, o):
-            if o.__class__.__name__ == 'DummyClass':
+            if o.__class__.__name__ == "DummyClass":
                 return "cool result"
             return FlaskJSONEncoder.default(self, o)
 
@@ -250,33 +252,33 @@ def default(self, o):
     flask_app.json_encoder = CustomEncoder
     app_client = flask_app.test_client()
 
-    resp = app_client.get('/v1.0/custom-json-response')
+    resp = app_client.get("/v1.0/custom-json-response")
     assert resp.status_code == 200
-    response = json.loads(resp.data.decode('utf-8', 'replace'))
-    assert response['theResult'] == 'cool result'
+    response = json.loads(resp.data.decode("utf-8", "replace"))
+    assert response["theResult"] == "cool result"
 
 
 def test_content_type_not_json(simple_app):
     app_client = simple_app.app.test_client()
 
-    resp = app_client.get('/v1.0/blob-response')
+    resp = app_client.get("/v1.0/blob-response")
     assert resp.status_code == 200
 
     # validate binary content
-    text, number = unpack('!4sh', resp.data)
-    assert text == b'cool'
+    text, number = unpack("!4sh", resp.data)
+    assert text == b"cool"
     assert number == 8
 
 
 def test_maybe_blob_or_json(simple_app):
     app_client = simple_app.app.test_client()
 
-    resp = app_client.get('/v1.0/binary-response')
+    resp = app_client.get("/v1.0/binary-response")
     assert resp.status_code == 200
-    assert resp.content_type == 'application/octet-stream'
+    assert resp.content_type == "application/octet-stream"
     # validate binary content
-    text, number = unpack('!4sh', resp.data)
-    assert text == b'cool'
+    text, number = unpack("!4sh", resp.data)
+    assert text == b"cool"
     assert number == 8
 
 
@@ -284,46 +286,42 @@ def test_bad_operations(bad_operations_app):
     # Bad operationIds in bad_operations_app should result in 501
     app_client = bad_operations_app.app.test_client()
 
-    resp = app_client.get('/v1.0/welcome')
+    resp = app_client.get("/v1.0/welcome")
     assert resp.status_code == 501
 
-    resp = app_client.put('/v1.0/welcome')
+    resp = app_client.put("/v1.0/welcome")
     assert resp.status_code == 501
 
-    resp = app_client.post('/v1.0/welcome')
+    resp = app_client.post("/v1.0/welcome")
     assert resp.status_code == 501
 
 
 def test_text_request(simple_app):
     app_client = simple_app.app.test_client()
 
-    resp = app_client.post('/v1.0/text-request', data='text')
+    resp = app_client.post("/v1.0/text-request", data="text")
     assert resp.status_code == 200
 
 
 def test_operation_handler_returns_flask_object(invalid_resp_allowed_app):
     app_client = invalid_resp_allowed_app.app.test_client()
-    resp = app_client.get('/v1.0/get_non_conforming_response')
+    resp = app_client.get("/v1.0/get_non_conforming_response")
     assert resp.status_code == 200
 
 
 def test_post_wrong_content_type(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.post('/v1.0/post_wrong_content_type',
-                           content_type="application/xml",
-                           data=json.dumps({"some": "data"})
-                           )
+    resp = app_client.post(
+        "/v1.0/post_wrong_content_type", content_type="application/xml", data=json.dumps({"some": "data"})
+    )
     assert resp.status_code == 415
 
-    resp = app_client.post('/v1.0/post_wrong_content_type',
-                           data=json.dumps({"some": "data"})
-                           )
+    resp = app_client.post("/v1.0/post_wrong_content_type", data=json.dumps({"some": "data"}))
     assert resp.status_code == 415
 
-    resp = app_client.post('/v1.0/post_wrong_content_type',
-                           content_type="application/x-www-form-urlencoded",
-                           data="a=1&b=2"
-                           )
+    resp = app_client.post(
+        "/v1.0/post_wrong_content_type", content_type="application/x-www-form-urlencoded", data="a=1&b=2"
+    )
     assert resp.status_code == 415
 
     # this test checks exactly what the test directly above is supposed to check,
@@ -332,91 +330,79 @@ def test_post_wrong_content_type(simple_app):
     # (https://github.com/pallets/werkzeug/issues/1159)
     # so that content-type is added to every request, we remove it here manually for our test
     # this test can be removed once the werkzeug issue is addressed
-    builder = EnvironBuilder(path='/v1.0/post_wrong_content_type', method='POST',
-                             data=json.dumps({"some": "data"}))
+    builder = EnvironBuilder(path="/v1.0/post_wrong_content_type", method="POST", data=json.dumps({"some": "data"}))
     try:
         environ = builder.get_environ()
     finally:
         builder.close()
 
-    content_type = 'CONTENT_TYPE'
+    content_type = "CONTENT_TYPE"
     if content_type in environ:
-        environ.pop('CONTENT_TYPE')
+        environ.pop("CONTENT_TYPE")
     # we cannot just call app_client.open() since app_client is a flask.testing.FlaskClient
     # which overrides werkzeug.test.Client.open() but does not allow passing an environment
     # directly
     resp = Client.open(app_client, environ)
     assert resp.status_code == 415
 
-
-    resp = app_client.post('/v1.0/post_wrong_content_type',
-                           content_type="application/json",
-                           data="not a valid json"
-                           )
-    assert resp.status_code == 400, \
-        "Should return 400 when Content-Type is json but content not parsable"
+    resp = app_client.post("/v1.0/post_wrong_content_type", content_type="application/json", data="not a valid json")
+    assert resp.status_code == 400, "Should return 400 when Content-Type is json but content not parsable"
 
 
 def test_get_unicode_response(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_unicode_response')
-    actualJson = {'currency': '\xa3', 'key': 'leena'}
-    assert json.loads(resp.data.decode('utf-8','replace')) == actualJson
+    resp = app_client.get("/v1.0/get_unicode_response")
+    actualJson = {"currency": "\xa3", "key": "leena"}
+    assert json.loads(resp.data.decode("utf-8", "replace")) == actualJson
 
 
 def test_get_enum_response(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_enum_response')
+    resp = app_client.get("/v1.0/get_enum_response")
     assert resp.status_code == 200
 
 
 def test_get_httpstatus_response(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_httpstatus_response')
+    resp = app_client.get("/v1.0/get_httpstatus_response")
     assert resp.status_code == 200
 
 
 def test_get_bad_default_response(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_bad_default_response/200')
+    resp = app_client.get("/v1.0/get_bad_default_response/200")
     assert resp.status_code == 200
 
-    resp = app_client.get('/v1.0/get_bad_default_response/202')
+    resp = app_client.get("/v1.0/get_bad_default_response/202")
     assert resp.status_code == 500
 
 
 def test_streaming_response(simple_app):
     app_client = simple_app.app.test_client()
-    resp = app_client.get('/v1.0/get_streaming_response')
+    resp = app_client.get("/v1.0/get_streaming_response")
     assert resp.status_code == 200
 
 
 def test_oneof(simple_openapi_app):
     app_client = simple_openapi_app.app.test_client()
 
-    post_greeting = app_client.post(  # type: flask.Response
-        '/v1.0/oneof_greeting',
-        data=json.dumps({"name": 3}),
-        content_type="application/json"
-    )
+    post_greeting = app_client.post(
+        "/v1.0/oneof_greeting", data=json.dumps({"name": 3}), content_type="application/json"
+    )  # type: flask.Response
     assert post_greeting.status_code == 200
-    assert post_greeting.content_type == 'application/json'
-    greeting_reponse = json.loads(post_greeting.data.decode('utf-8', 'replace'))
-    assert greeting_reponse['greeting'] == 'Hello 3'
-
-    post_greeting = app_client.post(  # type: flask.Response
-        '/v1.0/oneof_greeting',
-        data=json.dumps({"name": True}),
-        content_type="application/json"
-    )
+    assert post_greeting.content_type == "application/json"
+    greeting_reponse = json.loads(post_greeting.data.decode("utf-8", "replace"))
+    assert greeting_reponse["greeting"] == "Hello 3"
+
+    post_greeting = app_client.post(
+        "/v1.0/oneof_greeting", data=json.dumps({"name": True}), content_type="application/json"
+    )  # type: flask.Response
     assert post_greeting.status_code == 200
-    assert post_greeting.content_type == 'application/json'
-    greeting_reponse = json.loads(post_greeting.data.decode('utf-8', 'replace'))
-    assert greeting_reponse['greeting'] == 'Hello True'
-
-    post_greeting = app_client.post(  # type: flask.Response
-        '/v1.0/oneof_greeting',
-        data=json.dumps({"name": "jsantos"}),
-        content_type="application/json"
-    )
+    assert post_greeting.content_type == "application/json"
+    greeting_reponse = json.loads(post_greeting.data.decode("utf-8", "replace"))
+    assert greeting_reponse["greeting"] == "Hello True"
+
+    post_greeting = app_client.post(
+        "/v1.0/oneof_greeting", data=json.dumps({"name": "jsantos"}), content_type="application/json"
+    )  # type: flask.Response
     assert post_greeting.status_code == 400
diff --git a/tests/api/test_schema.py b/tests/api/test_schema.py
index 243d110..83f1dfd 100644
--- a/tests/api/test_schema.py
+++ b/tests/api/test_schema.py
@@ -3,237 +3,244 @@
 
 def test_schema(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    empty_request = app_client.post('/v1.0/test_schema', headers=headers, data=json.dumps({}))  # type: flask.Response
+    empty_request = app_client.post("/v1.0/test_schema", headers=headers, data=json.dumps({}))  # type: flask.Response
     assert empty_request.status_code == 400
-    assert empty_request.content_type == 'application/problem+json'
-    empty_request_response = json.loads(empty_request.data.decode('utf-8', 'replace'))  # type: dict
-    assert empty_request_response['title'] == 'Bad Request'
-    assert empty_request_response['detail'].startswith("'image_version' is a required property")
-
-    bad_type = app_client.post('/v1.0/test_schema', headers=headers,
-                               data=json.dumps({'image_version': 22}))  # type: flask.Response
+    assert empty_request.content_type == "application/problem+json"
+    empty_request_response = json.loads(empty_request.data.decode("utf-8", "replace"))  # type: dict
+    assert empty_request_response["title"] == "Bad Request"
+    assert empty_request_response["detail"].startswith("'image_version' is a required property")
+
+    bad_type = app_client.post(
+        "/v1.0/test_schema", headers=headers, data=json.dumps({"image_version": 22})
+    )  # type: flask.Response
     assert bad_type.status_code == 400
-    assert bad_type.content_type == 'application/problem+json'
-    bad_type_response = json.loads(bad_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert bad_type_response['title'] == 'Bad Request'
-    assert bad_type_response['detail'].startswith("22 is not of type 'string'")
-
-    bad_type_path = app_client.post('/v1.0/test_schema', headers=headers,
-                                         data=json.dumps({'image_version': 22}))  # type: flask.Response
+    assert bad_type.content_type == "application/problem+json"
+    bad_type_response = json.loads(bad_type.data.decode("utf-8", "replace"))  # type: dict
+    assert bad_type_response["title"] == "Bad Request"
+    assert bad_type_response["detail"].startswith("22 is not of type 'string'")
+
+    bad_type_path = app_client.post(
+        "/v1.0/test_schema", headers=headers, data=json.dumps({"image_version": 22})
+    )  # type: flask.Response
     assert bad_type_path.status_code == 400
-    assert bad_type_path.content_type == 'application/problem+json'
-    bad_type_path_response = json.loads(bad_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert bad_type_path_response['title'] == 'Bad Request'
-    assert bad_type_path_response['detail'].endswith(" - 'image_version'")
-
-    good_request = app_client.post('/v1.0/test_schema', headers=headers,
-                                   data=json.dumps({'image_version': 'version'}))  # type: flask.Response
+    assert bad_type_path.content_type == "application/problem+json"
+    bad_type_path_response = json.loads(bad_type.data.decode("utf-8", "replace"))  # type: dict
+    assert bad_type_path_response["title"] == "Bad Request"
+    assert bad_type_path_response["detail"].endswith(" - 'image_version'")
+
+    good_request = app_client.post(
+        "/v1.0/test_schema", headers=headers, data=json.dumps({"image_version": "version"})
+    )  # type: flask.Response
     assert good_request.status_code == 200
-    good_request_response = json.loads(good_request.data.decode('utf-8', 'replace'))  # type: dict
-    assert good_request_response['image_version'] == 'version'
+    good_request_response = json.loads(good_request.data.decode("utf-8", "replace"))  # type: dict
+    assert good_request_response["image_version"] == "version"
 
-    good_request_extra = app_client.post('/v1.0/test_schema', headers=headers,
-                                         data=json.dumps({'image_version': 'version',
-                                                          'extra': 'stuff'}))  # type: flask.Response
+    good_request_extra = app_client.post(
+        "/v1.0/test_schema", headers=headers, data=json.dumps({"image_version": "version", "extra": "stuff"})
+    )  # type: flask.Response
     assert good_request_extra.status_code == 200
-    good_request_extra_response = json.loads(good_request.data.decode('utf-8', 'replace'))  # type: dict
-    assert good_request_extra_response['image_version'] == 'version'
+    good_request_extra_response = json.loads(good_request.data.decode("utf-8", "replace"))  # type: dict
+    assert good_request_extra_response["image_version"] == "version"
 
-    wrong_type = app_client.post('/v1.0/test_schema', headers=headers, data=json.dumps(42))  # type: flask.Response
+    wrong_type = app_client.post("/v1.0/test_schema", headers=headers, data=json.dumps(42))  # type: flask.Response
     assert wrong_type.status_code == 400
-    assert wrong_type.content_type == 'application/problem+json'
-    wrong_type_response = json.loads(wrong_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_type_response['title'] == 'Bad Request'
-    assert wrong_type_response['detail'].startswith("42 is not of type 'object'")
+    assert wrong_type.content_type == "application/problem+json"
+    wrong_type_response = json.loads(wrong_type.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_type_response["title"] == "Bad Request"
+    assert wrong_type_response["detail"].startswith("42 is not of type 'object'")
 
 
 def test_schema_response(schema_app):
     app_client = schema_app.app.test_client()
 
-    request = app_client.get('/v1.0/test_schema/response/object/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/object/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/object/invalid_type', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/object/invalid_type", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/object/invalid_requirements', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/object/invalid_requirements", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/string/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/string/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/string/invalid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/string/invalid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/integer/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/integer/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/integer/invalid', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/integer/invalid", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/number/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/number/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/number/invalid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/number/invalid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/boolean/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/boolean/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/boolean/invalid', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/boolean/invalid", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/array/valid', headers={}, data=None)  # type: flask.Response
+    request = app_client.get("/v1.0/test_schema/response/array/valid", headers={}, data=None)  # type: flask.Response
     assert request.status_code == 200
-    request = app_client.get('/v1.0/test_schema/response/array/invalid_dict', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/array/invalid_dict", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
-    request = app_client.get('/v1.0/test_schema/response/array/invalid_string', headers={},
-                             data=None)  # type: flask.Response
+    request = app_client.get(
+        "/v1.0/test_schema/response/array/invalid_string", headers={}, data=None
+    )  # type: flask.Response
     assert request.status_code == 500
 
 
 def test_schema_in_query(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    good_request = app_client.post('/v1.0/test_schema_in_query', headers=headers,
-                                   query_string={'image_version': 'version',
-                                                 'not_required': 'test'})  # type: flask.Response
+    good_request = app_client.post(
+        "/v1.0/test_schema_in_query", headers=headers, query_string={"image_version": "version", "not_required": "test"}
+    )  # type: flask.Response
     assert good_request.status_code == 200
-    good_request_response = json.loads(good_request.data.decode('utf-8', 'replace'))  # type: dict
-    assert good_request_response['image_version'] == 'version'
+    good_request_response = json.loads(good_request.data.decode("utf-8", "replace"))  # type: dict
+    assert good_request_response["image_version"] == "version"
 
 
 def test_schema_list(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    wrong_type = app_client.post('/v1.0/test_schema_list', headers=headers, data=json.dumps(42))  # type: flask.Response
+    wrong_type = app_client.post("/v1.0/test_schema_list", headers=headers, data=json.dumps(42))  # type: flask.Response
     assert wrong_type.status_code == 400
-    assert wrong_type.content_type == 'application/problem+json'
-    wrong_type_response = json.loads(wrong_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_type_response['title'] == 'Bad Request'
-    assert wrong_type_response['detail'].startswith("42 is not of type 'array'")
-
-    wrong_items = app_client.post('/v1.0/test_schema_list', headers=headers,
-                                  data=json.dumps([42]))  # type: flask.Response
+    assert wrong_type.content_type == "application/problem+json"
+    wrong_type_response = json.loads(wrong_type.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_type_response["title"] == "Bad Request"
+    assert wrong_type_response["detail"].startswith("42 is not of type 'array'")
+
+    wrong_items = app_client.post(
+        "/v1.0/test_schema_list", headers=headers, data=json.dumps([42])
+    )  # type: flask.Response
     assert wrong_items.status_code == 400
-    assert wrong_items.content_type == 'application/problem+json'
-    wrong_items_response = json.loads(wrong_items.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_items_response['title'] == 'Bad Request'
-    assert wrong_items_response['detail'].startswith("42 is not of type 'string'")
+    assert wrong_items.content_type == "application/problem+json"
+    wrong_items_response = json.loads(wrong_items.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_items_response["title"] == "Bad Request"
+    assert wrong_items_response["detail"].startswith("42 is not of type 'string'")
 
 
 def test_schema_map(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    valid_object = {
-        "foo": {
-            "image_version": "string"
-        },
-        "bar": {
-            "image_version": "string"
-        }
-    }
+    valid_object = {"foo": {"image_version": "string"}, "bar": {"image_version": "string"}}
 
-    invalid_object = {
-        "foo": 42
-    }
+    invalid_object = {"foo": 42}
 
-    wrong_type = app_client.post('/v1.0/test_schema_map', headers=headers, data=json.dumps(42))  # type: flask.Response
+    wrong_type = app_client.post("/v1.0/test_schema_map", headers=headers, data=json.dumps(42))  # type: flask.Response
     assert wrong_type.status_code == 400
-    assert wrong_type.content_type == 'application/problem+json'
-    wrong_type_response = json.loads(wrong_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_type_response['title'] == 'Bad Request'
-    assert wrong_type_response['detail'].startswith("42 is not of type 'object'")
-
-    wrong_items = app_client.post('/v1.0/test_schema_map', headers=headers,
-                                  data=json.dumps(invalid_object))  # type: flask.Response
+    assert wrong_type.content_type == "application/problem+json"
+    wrong_type_response = json.loads(wrong_type.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_type_response["title"] == "Bad Request"
+    assert wrong_type_response["detail"].startswith("42 is not of type 'object'")
+
+    wrong_items = app_client.post(
+        "/v1.0/test_schema_map", headers=headers, data=json.dumps(invalid_object)
+    )  # type: flask.Response
     assert wrong_items.status_code == 400
-    assert wrong_items.content_type == 'application/problem+json'
-    wrong_items_response = json.loads(wrong_items.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_items_response['title'] == 'Bad Request'
-    assert wrong_items_response['detail'].startswith("42 is not of type 'object'")
-
-    right_type = app_client.post('/v1.0/test_schema_map', headers=headers,
-                                 data=json.dumps(valid_object))  # type: flask.Response
+    assert wrong_items.content_type == "application/problem+json"
+    wrong_items_response = json.loads(wrong_items.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_items_response["title"] == "Bad Request"
+    assert wrong_items_response["detail"].startswith("42 is not of type 'object'")
+
+    right_type = app_client.post(
+        "/v1.0/test_schema_map", headers=headers, data=json.dumps(valid_object)
+    )  # type: flask.Response
     assert right_type.status_code == 200
 
 
 def test_schema_recursive(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
     valid_object = {
         "children": [
             {"children": []},
-            {"children": [
-                {"children": []},
-            ]},
+            {
+                "children": [
+                    {"children": []},
+                ]
+            },
             {"children": []},
         ]
     }
 
-    invalid_object = {
-        "children": [42]
-    }
+    invalid_object = {"children": [42]}
 
-    wrong_type = app_client.post('/v1.0/test_schema_recursive', headers=headers,
-                                 data=json.dumps(42))  # type: flask.Response
+    wrong_type = app_client.post(
+        "/v1.0/test_schema_recursive", headers=headers, data=json.dumps(42)
+    )  # type: flask.Response
     assert wrong_type.status_code == 400
-    assert wrong_type.content_type == 'application/problem+json'
-    wrong_type_response = json.loads(wrong_type.data.decode('utf-8'))  # type: dict
-    assert wrong_type_response['title'] == 'Bad Request'
-    assert wrong_type_response['detail'].startswith("42 is not of type 'object'")
-
-    wrong_items = app_client.post('/v1.0/test_schema_recursive', headers=headers,
-                                  data=json.dumps(invalid_object))  # type: flask.Response
+    assert wrong_type.content_type == "application/problem+json"
+    wrong_type_response = json.loads(wrong_type.data.decode("utf-8"))  # type: dict
+    assert wrong_type_response["title"] == "Bad Request"
+    assert wrong_type_response["detail"].startswith("42 is not of type 'object'")
+
+    wrong_items = app_client.post(
+        "/v1.0/test_schema_recursive", headers=headers, data=json.dumps(invalid_object)
+    )  # type: flask.Response
     assert wrong_items.status_code == 400
-    assert wrong_items.content_type == 'application/problem+json'
-    wrong_items_response = json.loads(wrong_items.data.decode('utf-8'))  # type: dict
-    assert wrong_items_response['title'] == 'Bad Request'
-    assert wrong_items_response['detail'].startswith("42 is not of type 'object'")
-
-    right_type = app_client.post('/v1.0/test_schema_recursive', headers=headers,
-                                 data=json.dumps(valid_object))  # type: flask.Response
+    assert wrong_items.content_type == "application/problem+json"
+    wrong_items_response = json.loads(wrong_items.data.decode("utf-8"))  # type: dict
+    assert wrong_items_response["title"] == "Bad Request"
+    assert wrong_items_response["detail"].startswith("42 is not of type 'object'")
+
+    right_type = app_client.post(
+        "/v1.0/test_schema_recursive", headers=headers, data=json.dumps(valid_object)
+    )  # type: flask.Response
     assert right_type.status_code == 200
 
 
 def test_schema_format(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    wrong_type = app_client.post('/v1.0/test_schema_format', headers=headers,
-                                 data=json.dumps("xy"))  # type: flask.Response
+    wrong_type = app_client.post(
+        "/v1.0/test_schema_format", headers=headers, data=json.dumps("xy")
+    )  # type: flask.Response
     assert wrong_type.status_code == 400
-    assert wrong_type.content_type == 'application/problem+json'
-    wrong_type_response = json.loads(wrong_type.data.decode('utf-8', 'replace'))  # type: dict
-    assert wrong_type_response['title'] == 'Bad Request'
-    assert "'xy' is not a 'email'" in wrong_type_response['detail']
+    assert wrong_type.content_type == "application/problem+json"
+    wrong_type_response = json.loads(wrong_type.data.decode("utf-8", "replace"))  # type: dict
+    assert wrong_type_response["title"] == "Bad Request"
+    assert "'xy' is not a 'email'" in wrong_type_response["detail"]
 
 
 def test_schema_array(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    array_request = app_client.post('/v1.0/schema_array', headers=headers,
-                                    data=json.dumps(['list', 'hello']))  # type: flask.Response
+    array_request = app_client.post(
+        "/v1.0/schema_array", headers=headers, data=json.dumps(["list", "hello"])
+    )  # type: flask.Response
     assert array_request.status_code == 200
-    assert array_request.content_type == 'application/json'
-    array_response = json.loads(array_request.data.decode('utf-8', 'replace'))  # type: list
-    assert array_response == ['list', 'hello']
+    assert array_request.content_type == "application/json"
+    array_response = json.loads(array_request.data.decode("utf-8", "replace"))  # type: list
+    assert array_response == ["list", "hello"]
 
 
 def test_schema_int(schema_app):
     app_client = schema_app.app.test_client()
-    headers = {'Content-type': 'application/json'}
+    headers = {"Content-type": "application/json"}
 
-    array_request = app_client.post('/v1.0/schema_int', headers=headers,
-                                    data=json.dumps(42))  # type: flask.Response
+    array_request = app_client.post("/v1.0/schema_int", headers=headers, data=json.dumps(42))  # type: flask.Response
     assert array_request.status_code == 200
-    assert array_request.content_type == 'application/json'
-    array_response = json.loads(array_request.data.decode('utf-8', 'replace'))  # type: list
+    assert array_request.content_type == "application/json"
+    array_response = json.loads(array_request.data.decode("utf-8", "replace"))  # type: list
     assert array_response == 42
 
 
 def test_global_response_definitions(schema_app):
     app_client = schema_app.app.test_client()
-    resp = app_client.get('/v1.0/define_global_response')
-    assert json.loads(resp.data.decode('utf-8', 'replace')) == ['general', 'list']
+    resp = app_client.get("/v1.0/define_global_response")
+    assert json.loads(resp.data.decode("utf-8", "replace")) == ["general", "list"]
diff --git a/tests/api/test_secure_api.py b/tests/api/test_secure_api.py
index 2ceac77..8ff568d 100644
--- a/tests/api/test_secure_api.py
+++ b/tests/api/test_secure_api.py
@@ -4,131 +4,133 @@
 def test_security_over_nonexistent_endpoints(oauth_requests, secure_api_app):
     app_client = secure_api_app.app.test_client()
     headers = {"Authorization": "Bearer 300"}
-    get_inexistent_endpoint = app_client.get('/v1.0/does-not-exist-invalid-token',
-                                             headers=headers)  # type: flask.Response
+    get_inexistent_endpoint = app_client.get(
+        "/v1.0/does-not-exist-invalid-token", headers=headers
+    )  # type: flask.Response
     assert get_inexistent_endpoint.status_code == 401
-    assert get_inexistent_endpoint.content_type == 'application/problem+json'
+    assert get_inexistent_endpoint.content_type == "application/problem+json"
 
     headers = {"Authorization": "Bearer 100"}
-    get_inexistent_endpoint = app_client.get('/v1.0/does-not-exist-valid-token',
-                                             headers=headers)  # type: flask.Response
+    get_inexistent_endpoint = app_client.get(
+        "/v1.0/does-not-exist-valid-token", headers=headers
+    )  # type: flask.Response
     assert get_inexistent_endpoint.status_code == 404
-    assert get_inexistent_endpoint.content_type == 'application/problem+json'
+    assert get_inexistent_endpoint.content_type == "application/problem+json"
 
-    get_inexistent_endpoint = app_client.get('/v1.0/does-not-exist-no-token')  # type: flask.Response
+    get_inexistent_endpoint = app_client.get("/v1.0/does-not-exist-no-token")  # type: flask.Response
     assert get_inexistent_endpoint.status_code == 401
 
-    swagger_ui = app_client.get('/v1.0/ui/')  # type: flask.Response
+    swagger_ui = app_client.get("/v1.0/ui/")  # type: flask.Response
     assert swagger_ui.status_code == 401
 
     headers = {"Authorization": "Bearer 100"}
-    post_greeting = app_client.post('/v1.0/greeting/rcaricio', data={}, headers=headers)  # type: flask.Response
+    post_greeting = app_client.post("/v1.0/greeting/rcaricio", data={}, headers=headers)  # type: flask.Response
     assert post_greeting.status_code == 200
 
-    post_greeting = app_client.post('/v1.0/greeting/rcaricio', data={})  # type: flask.Response
+    post_greeting = app_client.post("/v1.0/greeting/rcaricio", data={})  # type: flask.Response
     assert post_greeting.status_code == 401
 
 
 def test_security(oauth_requests, secure_endpoint_app):
     app_client = secure_endpoint_app.app.test_client()
 
-    get_bye_no_auth = app_client.get('/v1.0/byesecure/jsantos')  # type: flask.Response
+    get_bye_no_auth = app_client.get("/v1.0/byesecure/jsantos")  # type: flask.Response
     assert get_bye_no_auth.status_code == 401
-    assert get_bye_no_auth.content_type == 'application/problem+json'
-    get_bye_no_auth_reponse = json.loads(get_bye_no_auth.data.decode('utf-8', 'replace'))  # type: dict
-    assert get_bye_no_auth_reponse['title'] == 'Unauthorized'
-    assert get_bye_no_auth_reponse['detail'] == "No authorization token provided"
+    assert get_bye_no_auth.content_type == "application/problem+json"
+    get_bye_no_auth_reponse = json.loads(get_bye_no_auth.data.decode("utf-8", "replace"))  # type: dict
+    assert get_bye_no_auth_reponse["title"] == "Unauthorized"
+    assert get_bye_no_auth_reponse["detail"] == "No authorization token provided"
 
     headers = {"Authorization": "Bearer 100"}
-    get_bye_good_auth = app_client.get('/v1.0/byesecure/jsantos', headers=headers)  # type: flask.Response
+    get_bye_good_auth = app_client.get("/v1.0/byesecure/jsantos", headers=headers)  # type: flask.Response
     assert get_bye_good_auth.status_code == 200
-    assert get_bye_good_auth.data == b'Goodbye jsantos (Secure: test-user)'
+    assert get_bye_good_auth.data == b"Goodbye jsantos (Secure: test-user)"
 
     headers = {"Authorization": "Bearer 200"}
-    get_bye_wrong_scope = app_client.get('/v1.0/byesecure/jsantos', headers=headers)  # type: flask.Response
+    get_bye_wrong_scope = app_client.get("/v1.0/byesecure/jsantos", headers=headers)  # type: flask.Response
     assert get_bye_wrong_scope.status_code == 403
-    assert get_bye_wrong_scope.content_type == 'application/problem+json'
-    get_bye_wrong_scope_reponse = json.loads(get_bye_wrong_scope.data.decode('utf-8', 'replace'))  # type: dict
-    assert get_bye_wrong_scope_reponse['title'] == 'Forbidden'
-    assert get_bye_wrong_scope_reponse['detail'] == "Provided token doesn't have the required scope"
+    assert get_bye_wrong_scope.content_type == "application/problem+json"
+    get_bye_wrong_scope_reponse = json.loads(get_bye_wrong_scope.data.decode("utf-8", "replace"))  # type: dict
+    assert get_bye_wrong_scope_reponse["title"] == "Forbidden"
+    assert get_bye_wrong_scope_reponse["detail"] == "Provided token doesn't have the required scope"
 
     headers = {"Authorization": "Bearer 300"}
-    get_bye_bad_token = app_client.get('/v1.0/byesecure/jsantos', headers=headers)  # type: flask.Response
+    get_bye_bad_token = app_client.get("/v1.0/byesecure/jsantos", headers=headers)  # type: flask.Response
     assert get_bye_bad_token.status_code == 401
-    assert get_bye_bad_token.content_type == 'application/problem+json'
-    get_bye_bad_token_reponse = json.loads(get_bye_bad_token.data.decode('utf-8', 'replace'))  # type: dict
-    assert get_bye_bad_token_reponse['title'] == 'Unauthorized'
-    assert get_bye_bad_token_reponse['detail'] == "Provided token is not valid"
+    assert get_bye_bad_token.content_type == "application/problem+json"
+    get_bye_bad_token_reponse = json.loads(get_bye_bad_token.data.decode("utf-8", "replace"))  # type: dict
+    assert get_bye_bad_token_reponse["title"] == "Unauthorized"
+    assert get_bye_bad_token_reponse["detail"] == "Provided token is not valid"
 
-    response = app_client.get('/v1.0/more-than-one-security-definition')  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-security-definition")  # type: flask.Response
     assert response.status_code == 401
 
     # also tests case-insensitivity
     headers = {"X-AUTH": "mykey"}
-    response = app_client.get('/v1.0/more-than-one-security-definition', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-security-definition", headers=headers)  # type: flask.Response
     assert response.status_code == 200
 
     headers = {"Authorization": "Bearer 100"}
-    get_bye_good_auth = app_client.get('/v1.0/byesecure-ignoring-context/hjacobs',
-                                       headers=headers)  # type: flask.Response
+    get_bye_good_auth = app_client.get(
+        "/v1.0/byesecure-ignoring-context/hjacobs", headers=headers
+    )  # type: flask.Response
     assert get_bye_good_auth.status_code == 200
-    assert get_bye_good_auth.data == b'Goodbye hjacobs (Secure!)'
+    assert get_bye_good_auth.data == b"Goodbye hjacobs (Secure!)"
 
     headers = {"Authorization": "Bearer 100"}
-    get_bye_from_flask = app_client.get('/v1.0/byesecure-from-flask', headers=headers)  # type: flask.Response
-    assert get_bye_from_flask.data == b'Goodbye test-user (Secure!)'
+    get_bye_from_flask = app_client.get("/v1.0/byesecure-from-flask", headers=headers)  # type: flask.Response
+    assert get_bye_from_flask.data == b"Goodbye test-user (Secure!)"
 
     headers = {"Authorization": "Bearer 100"}
-    get_bye_from_firetail = app_client.get('/v1.0/byesecure-from-firetail', headers=headers)  # type: flask.Response
-    assert get_bye_from_firetail.data == b'Goodbye test-user (Secure!)'
+    get_bye_from_firetail = app_client.get("/v1.0/byesecure-from-firetail", headers=headers)  # type: flask.Response
+    assert get_bye_from_firetail.data == b"Goodbye test-user (Secure!)"
 
     headers = {"Authorization": "Bearer 100"}
-    get_bye_from_firetail = app_client.get('/v1.0/byesecure-jwt/test-user', headers=headers)  # type: flask.Response
-    assert get_bye_from_firetail.data == b'Goodbye test-user (Secure: 100)'
+    get_bye_from_firetail = app_client.get("/v1.0/byesecure-jwt/test-user", headers=headers)  # type: flask.Response
+    assert get_bye_from_firetail.data == b"Goodbye test-user (Secure: 100)"
 
     # has optional auth
-    response = app_client.get('/v1.0/optional-auth')  # type: flask.Response
+    response = app_client.get("/v1.0/optional-auth")  # type: flask.Response
     assert response.status_code == 200
     assert response.data == b'"Unauthenticated"\n'
     headers = {"X-AUTH": "mykey"}
-    response = app_client.get('/v1.0/optional-auth', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/optional-auth", headers=headers)  # type: flask.Response
     assert response.status_code == 200
     assert response.data == b'"Authenticated"\n'
     headers = {"X-AUTH": "wrong-key"}
-    response = app_client.get('/v1.0/optional-auth', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/optional-auth", headers=headers)  # type: flask.Response
     assert response.data == b'"Unauthenticated"\n'
     assert response.status_code == 200
 
     # security function throws exception
-    response = app_client.get('/v1.0/auth-exception', headers={'X-Api-Key': 'foo'})
+    response = app_client.get("/v1.0/auth-exception", headers={"X-Api-Key": "foo"})
     assert response.status_code == 401
 
 
-def test_checking_that_client_token_has_all_necessary_scopes(
-        oauth_requests, secure_endpoint_app):
+def test_checking_that_client_token_has_all_necessary_scopes(oauth_requests, secure_endpoint_app):
     app_client = secure_endpoint_app.app.test_client()
 
     # has only one of the required scopes
     headers = {"Authorization": "Bearer has_myscope"}
-    response = app_client.get('/v1.0/more-than-one-scope', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-scope", headers=headers)  # type: flask.Response
     assert response.status_code == 403
 
     # has none of the necessary scopes
     headers = {"Authorization": "Bearer has_wrongscope"}
-    response = app_client.get('/v1.0/more-than-one-scope', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-scope", headers=headers)  # type: flask.Response
     assert response.status_code == 403
 
     # is not auth
     headers = {"Authorization": "Bearer is_not_invalid"}
-    response = app_client.get('/v1.0/more-than-one-scope', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-scope", headers=headers)  # type: flask.Response
     assert response.status_code == 401
 
     # has all necessary scopes
     headers = {"Authorization": "Bearer has_myscope_otherscope"}
-    response = app_client.get('/v1.0/more-than-one-scope', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-scope", headers=headers)  # type: flask.Response
     assert response.status_code == 200
 
     # has all necessary scopes but under key 'scopes'
     headers = {"Authorization": "Bearer has_scopes_in_scopes_with_s"}
-    response = app_client.get('/v1.0/more-than-one-scope', headers=headers)  # type: flask.Response
+    response = app_client.get("/v1.0/more-than-one-scope", headers=headers)  # type: flask.Response
     assert response.status_code == 200
diff --git a/tests/api/test_unordered_definition.py b/tests/api/test_unordered_definition.py
index fbe93ea..7faf47d 100644
--- a/tests/api/test_unordered_definition.py
+++ b/tests/api/test_unordered_definition.py
@@ -3,7 +3,7 @@
 
 def test_app(unordered_definition_app):
     app_client = unordered_definition_app.app.test_client()
-    response = app_client.get('/v1.0/unordered-params/1?first=first&second=2')  # type: flask.Response
+    response = app_client.get("/v1.0/unordered-params/1?first=first&second=2")  # type: flask.Response
     assert response.status_code == 400
-    response_data = json.loads(response.data.decode('utf-8', 'replace'))
-    assert response_data['detail'] == 'Wrong type, expected \'integer\' for query parameter \'first\''
+    response_data = json.loads(response.data.decode("utf-8", "replace"))
+    assert response_data["detail"] == "Wrong type, expected 'integer' for query parameter 'first'"
diff --git a/tests/conftest.py b/tests/conftest.py
index 096f000..9211298 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -10,7 +10,7 @@
 logging.basicConfig(level=logging.DEBUG)
 
 TEST_FOLDER = pathlib.Path(__file__).parent
-FIXTURES_FOLDER = TEST_FOLDER / 'fixtures'
+FIXTURES_FOLDER = TEST_FOLDER / "fixtures"
 SPEC_FOLDER = TEST_FOLDER / "fakeapi"
 OPENAPI2_SPEC = ["swagger.yaml"]
 OPENAPI3_SPEC = ["openapi.yaml"]
@@ -44,7 +44,7 @@ def fake_get(url, params=None, headers=None, timeout=None):
         """
         headers = headers or {}
         if url == "https://oauth.example/token_info":
-            token = headers.get('Authorization', 'invalid').split()[-1]
+            token = headers.get("Authorization", "invalid").split()[-1]
             if token in ["100", "has_myscope"]:
                 return FakeResponse(200, '{"uid": "test-user", "scope": ["myscope"]}')
             if token in ["200", "has_wrongscope"]:
@@ -52,12 +52,12 @@ def fake_get(url, params=None, headers=None, timeout=None):
             if token == "has_myscope_otherscope":
                 return FakeResponse(200, '{"uid": "test-user", "scope": ["myscope", "otherscope"]}')
             if token in ["300", "is_not_invalid"]:
-                return FakeResponse(404, '')
+                return FakeResponse(404, "")
             if token == "has_scopes_in_scopes_with_s":
                 return FakeResponse(200, '{"uid": "test-user", "scopes": ["myscope", "otherscope"]}')
         return url
 
-    monkeypatch.setattr('firetail.security.flask_security_handler_factory.session.get', fake_get)
+    monkeypatch.setattr("firetail.security.flask_security_handler_factory.session.get", fake_get)
 
 
 @pytest.fixture
@@ -69,55 +69,52 @@ def security_handler_factory():
 @pytest.fixture
 def app():
     cnx_app = App(__name__, port=5001, specification_dir=SPEC_FOLDER, debug=True)
-    cnx_app.add_api('api.yaml', validate_responses=True)
+    cnx_app.add_api("api.yaml", validate_responses=True)
     return cnx_app
 
 
 @pytest.fixture
 def simple_api_spec_dir():
-    return FIXTURES_FOLDER / 'simple'
+    return FIXTURES_FOLDER / "simple"
 
 
-@pytest.fixture(scope='session')
+@pytest.fixture(scope="session")
 def aiohttp_api_spec_dir():
-    return FIXTURES_FOLDER / 'aiohttp'
+    return FIXTURES_FOLDER / "aiohttp"
 
 
 @pytest.fixture
 def problem_api_spec_dir():
-    return FIXTURES_FOLDER / 'problem'
+    return FIXTURES_FOLDER / "problem"
 
 
 @pytest.fixture
 def secure_api_spec_dir():
-    return FIXTURES_FOLDER / 'secure_api'
+    return FIXTURES_FOLDER / "secure_api"
 
 
 @pytest.fixture
 def default_param_error_spec_dir():
-    return FIXTURES_FOLDER / 'default_param_error'
+    return FIXTURES_FOLDER / "default_param_error"
 
 
 @pytest.fixture
 def json_validation_spec_dir():
-    return FIXTURES_FOLDER / 'json_validation'
+    return FIXTURES_FOLDER / "json_validation"
 
 
-@pytest.fixture(scope='session')
+@pytest.fixture(scope="session")
 def json_datetime_dir():
-    return FIXTURES_FOLDER / 'datetime_support'
+    return FIXTURES_FOLDER / "datetime_support"
 
 
-def build_app_from_fixture(api_spec_folder, spec_file='openapi.yaml', **kwargs):
+def build_app_from_fixture(api_spec_folder, spec_file="openapi.yaml", **kwargs):
     debug = True
-    if 'debug' in kwargs:
-        debug = kwargs['debug']
-        del (kwargs['debug'])
+    if "debug" in kwargs:
+        debug = kwargs["debug"]
+        del kwargs["debug"]
 
-    cnx_app = App(__name__,
-                  port=5001,
-                  specification_dir=FIXTURES_FOLDER / api_spec_folder,
-                  debug=debug)
+    cnx_app = App(__name__, port=5001, specification_dir=FIXTURES_FOLDER / api_spec_folder, debug=debug)
 
     cnx_app.add_api(spec_file, **kwargs)
     cnx_app._spec_file = spec_file
@@ -126,20 +123,18 @@ def build_app_from_fixture(api_spec_folder, spec_file='openapi.yaml', **kwargs):
 
 @pytest.fixture(scope="session", params=SPECS)
 def simple_app(request):
-    return build_app_from_fixture('simple', request.param, validate_responses=True)
+    return build_app_from_fixture("simple", request.param, validate_responses=True)
 
 
 @pytest.fixture(scope="session", params=OPENAPI3_SPEC)
 def simple_openapi_app(request):
-    return build_app_from_fixture('simple', request.param, validate_responses=True)
+    return build_app_from_fixture("simple", request.param, validate_responses=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def reverse_proxied_app(request):
-
     # adapted from http://flask.pocoo.org/snippets/35/
     class ReverseProxied:
-
         def __init__(self, app, script_name=None, scheme=None, server=None):
             self.app = app
             self.script_name = script_name
@@ -147,88 +142,78 @@ def __init__(self, app, script_name=None, scheme=None, server=None):
             self.server = server
 
         def __call__(self, environ, start_response):
-            script_name = environ.get('HTTP_X_FORWARDED_PATH', '') or self.script_name
+            script_name = environ.get("HTTP_X_FORWARDED_PATH", "") or self.script_name
             if script_name:
-                environ['SCRIPT_NAME'] = "/" + script_name.lstrip("/")
-                path_info = environ['PATH_INFO']
+                environ["SCRIPT_NAME"] = "/" + script_name.lstrip("/")
+                path_info = environ["PATH_INFO"]
                 if path_info.startswith(script_name):
-                    environ['PATH_INFO_OLD'] = path_info
-                    environ['PATH_INFO'] = path_info[len(script_name):]
-            scheme = environ.get('HTTP_X_SCHEME', '') or self.scheme
+                    environ["PATH_INFO_OLD"] = path_info
+                    environ["PATH_INFO"] = path_info[len(script_name) :]
+            scheme = environ.get("HTTP_X_SCHEME", "") or self.scheme
             if scheme:
-                environ['wsgi.url_scheme'] = scheme
-            server = environ.get('HTTP_X_FORWARDED_SERVER', '') or self.server
+                environ["wsgi.url_scheme"] = scheme
+            server = environ.get("HTTP_X_FORWARDED_SERVER", "") or self.server
             if server:
-                environ['HTTP_HOST'] = server
+                environ["HTTP_HOST"] = server
             return self.app(environ, start_response)
 
-    app = build_app_from_fixture('simple', request.param, validate_responses=True)
+    app = build_app_from_fixture("simple", request.param, validate_responses=True)
     flask_app = app.app
-    proxied = ReverseProxied(
-        flask_app.wsgi_app,
-        script_name='/reverse_proxied/'
-    )
+    proxied = ReverseProxied(flask_app.wsgi_app, script_name="/reverse_proxied/")
     flask_app.wsgi_app = proxied
     return app
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def snake_case_app(request):
-    return build_app_from_fixture('snake_case', request.param,
-                                  validate_responses=True,
-                                  pythonic_params=True)
+    return build_app_from_fixture("snake_case", request.param, validate_responses=True, pythonic_params=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def invalid_resp_allowed_app(request):
-    return build_app_from_fixture('simple', request.param,
-                                  validate_responses=False)
+    return build_app_from_fixture("simple", request.param, validate_responses=False)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def strict_app(request):
-    return build_app_from_fixture('simple', request.param,
-                                  validate_responses=True,
-                                  strict_validation=True)
+    return build_app_from_fixture("simple", request.param, validate_responses=True, strict_validation=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def problem_app(request):
-    return build_app_from_fixture('problem', request.param,
-                                  validate_responses=True)
+    return build_app_from_fixture("problem", request.param, validate_responses=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def schema_app(request):
-    return build_app_from_fixture('different_schemas', request.param,
-                                  validate_responses=True)
+    return build_app_from_fixture("different_schemas", request.param, validate_responses=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def secure_endpoint_app(request):
-    return build_app_from_fixture('secure_endpoint', request.param,
-                                  validate_responses=True, pass_context_arg_name='req_context')
+    return build_app_from_fixture(
+        "secure_endpoint", request.param, validate_responses=True, pass_context_arg_name="req_context"
+    )
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def secure_api_app(request):
     options = {"swagger_ui": False}
-    return build_app_from_fixture('secure_api', request.param,
-                                  options=options, auth_all_paths=True)
+    return build_app_from_fixture("secure_api", request.param, options=options, auth_all_paths=True)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def unordered_definition_app(request):
-    return build_app_from_fixture('unordered_definition', request.param)
+    return build_app_from_fixture("unordered_definition", request.param)
 
 
 @pytest.fixture(scope="session", params=SPECS)
 def bad_operations_app(request):
-    return build_app_from_fixture('bad_operations', request.param,
-                                  resolver_error=501)
+    return build_app_from_fixture("bad_operations", request.param, resolver_error=501)
 
 
 if sys.version_info < (3, 5, 3) and sys.version_info[0] == 3:
+
     @pytest.fixture
     def aiohttp_client(test_client):
         return test_client
diff --git a/tests/decorators/test_parameter.py b/tests/decorators/test_parameter.py
index c2d27d5..de2956c 100644
--- a/tests/decorators/test_parameter.py
+++ b/tests/decorators/test_parameter.py
@@ -4,7 +4,7 @@
 
 
 def test_injection():
-    request = MagicMock(name='request', path_params={'p1': '123'})
+    request = MagicMock(name="request", path_params={"p1": "123"})
     request.args = {}
     request.headers = {}
     request.params = {}
@@ -15,18 +15,18 @@ def handler(**kwargs):
         func(**kwargs)
 
     class Op:
-        consumes = ['application/json']
+        consumes = ["application/json"]
 
         def get_arguments(self, *args, **kwargs):
             return {"p1": "123"}
 
     parameter_to_arg(Op(), handler)(request)
-    func.assert_called_with(p1='123')
+    func.assert_called_with(p1="123")
 
-    parameter_to_arg(Op(), handler, pass_context_arg_name='framework_request_ctx')(request)
-    func.assert_called_with(p1='123', framework_request_ctx=request.context)
+    parameter_to_arg(Op(), handler, pass_context_arg_name="framework_request_ctx")(request)
+    func.assert_called_with(p1="123", framework_request_ctx=request.context)
 
 
 def test_pythonic_params():
-    assert pythonic('orderBy[eq]') == 'order_by_eq'
-    assert pythonic('ids[]') == 'ids'
+    assert pythonic("orderBy[eq]") == "order_by_eq"
+    assert pythonic("ids[]") == "ids"
diff --git a/tests/decorators/test_security.py b/tests/decorators/test_security.py
index 43fcfa7..eff804d 100644
--- a/tests/decorators/test_security.py
+++ b/tests/decorators/test_security.py
@@ -13,25 +13,25 @@
 
 
 def test_get_tokeninfo_url(monkeypatch, security_handler_factory):
-    security_handler_factory.get_token_info_remote = MagicMock(return_value='get_token_info_remote_result')
+    security_handler_factory.get_token_info_remote = MagicMock(return_value="get_token_info_remote_result")
     env = {}
-    monkeypatch.setattr('os.environ', env)
+    monkeypatch.setattr("os.environ", env)
     logger = MagicMock()
-    monkeypatch.setattr('firetail.security.security_handler_factory.logger', logger)
+    monkeypatch.setattr("firetail.security.security_handler_factory.logger", logger)
 
     security_def = {}
     assert security_handler_factory.get_tokeninfo_func(security_def) is None
     logger.warn.assert_not_called()
 
-    env['TOKENINFO_URL'] = 'issue-146'
-    assert security_handler_factory.get_tokeninfo_func(security_def) == 'get_token_info_remote_result'
-    security_handler_factory.get_token_info_remote.assert_called_with('issue-146')
+    env["TOKENINFO_URL"] = "issue-146"
+    assert security_handler_factory.get_tokeninfo_func(security_def) == "get_token_info_remote_result"
+    security_handler_factory.get_token_info_remote.assert_called_with("issue-146")
     logger.warn.assert_not_called()
     logger.warn.reset_mock()
 
-    security_def = {'x-tokenInfoUrl': 'bar'}
-    assert security_handler_factory.get_tokeninfo_func(security_def) == 'get_token_info_remote_result'
-    security_handler_factory.get_token_info_remote.assert_called_with('bar')
+    security_def = {"x-tokenInfoUrl": "bar"}
+    assert security_handler_factory.get_tokeninfo_func(security_def) == "get_token_info_remote_result"
+    security_handler_factory.get_token_info_remote.assert_called_with("bar")
     logger.warn.assert_not_called()
 
 
@@ -39,7 +39,7 @@ def test_verify_oauth_missing_auth_header(security_handler_factory):
     def somefunc(token):
         return None
 
-    wrapped_func = security_handler_factory.verify_oauth(somefunc, security_handler_factory.validate_scope, ['admin'])
+    wrapped_func = security_handler_factory.verify_oauth(somefunc, security_handler_factory.validate_scope, ["admin"])
 
     request = MagicMock()
     request.headers = {}
@@ -56,15 +56,17 @@ def get_tokeninfo_response(*args, **kwargs):
         tokeninfo_response._content = json.dumps(tokeninfo).encode()
         return tokeninfo_response
 
-    token_info_func = security_handler_factory.get_tokeninfo_func({'x-tokenInfoUrl': 'https://example.org/tokeninfo'})
-    wrapped_func = security_handler_factory.verify_oauth(token_info_func, security_handler_factory.validate_scope, ['admin'])
+    token_info_func = security_handler_factory.get_tokeninfo_func({"x-tokenInfoUrl": "https://example.org/tokeninfo"})
+    wrapped_func = security_handler_factory.verify_oauth(
+        token_info_func, security_handler_factory.validate_scope, ["admin"]
+    )
 
     request = MagicMock()
     request.headers = {"Authorization": "Bearer 123"}
 
     session = MagicMock()
     session.get = get_tokeninfo_response
-    monkeypatch.setattr('firetail.security.flask_security_handler_factory.session', session)
+    monkeypatch.setattr("firetail.security.flask_security_handler_factory.session", session)
 
     with pytest.raises(OAuthScopeProblem, match="Provided token doesn't have the required scope"):
         wrapped_func(request)
@@ -84,7 +86,7 @@ def test_verify_oauth_invalid_local_token_response_none(security_handler_factory
     def somefunc(token):
         return None
 
-    wrapped_func = security_handler_factory.verify_oauth(somefunc, security_handler_factory.validate_scope, ['admin'])
+    wrapped_func = security_handler_factory.verify_oauth(somefunc, security_handler_factory.validate_scope, ["admin"])
 
     request = MagicMock()
     request.headers = {"Authorization": "Bearer 123"}
@@ -99,7 +101,7 @@ def test_verify_oauth_scopes_local(security_handler_factory):
     def token_info(token):
         return tokeninfo
 
-    wrapped_func = security_handler_factory.verify_oauth(token_info, security_handler_factory.validate_scope, ['admin'])
+    wrapped_func = security_handler_factory.verify_oauth(token_info, security_handler_factory.validate_scope, ["admin"])
 
     request = MagicMock()
     request.headers = {"Authorization": "Bearer 123"}
@@ -132,102 +134,101 @@ def somefunc(username, password, required_scopes=None):
 
 def test_verify_basic(security_handler_factory):
     def basic_info(username, password, required_scopes=None):
-        if username == 'foo' and password == 'bar':
-            return {'sub': 'foo'}
+        if username == "foo" and password == "bar":
+            return {"sub": "foo"}
         return None
 
     wrapped_func = security_handler_factory.verify_basic(basic_info)
 
     request = MagicMock()
-    request.headers = {"Authorization": 'Basic Zm9vOmJhcg=='}
+    request.headers = {"Authorization": "Basic Zm9vOmJhcg=="}
 
     assert wrapped_func(request) is not None
 
 
 def test_verify_apikey_query(security_handler_factory):
     def apikey_info(apikey, required_scopes=None):
-        if apikey == 'foobar':
-            return {'sub': 'foo'}
+        if apikey == "foobar":
+            return {"sub": "foo"}
         return None
 
-    wrapped_func = security_handler_factory.verify_api_key(apikey_info, 'query', 'auth')
+    wrapped_func = security_handler_factory.verify_api_key(apikey_info, "query", "auth")
 
     request = MagicMock()
-    request.query = {"auth": 'foobar'}
+    request.query = {"auth": "foobar"}
 
     assert wrapped_func(request) is not None
 
 
 def test_verify_apikey_header(security_handler_factory):
     def apikey_info(apikey, required_scopes=None):
-        if apikey == 'foobar':
-            return {'sub': 'foo'}
+        if apikey == "foobar":
+            return {"sub": "foo"}
         return None
 
-    wrapped_func = security_handler_factory.verify_api_key(apikey_info, 'header', 'X-Auth')
+    wrapped_func = security_handler_factory.verify_api_key(apikey_info, "header", "X-Auth")
 
     request = MagicMock()
-    request.headers = {"X-Auth": 'foobar'}
+    request.headers = {"X-Auth": "foobar"}
 
     assert wrapped_func(request) is not None
 
 
 def test_multiple_schemes(security_handler_factory):
     def apikey1_info(apikey, required_scopes=None):
-        if apikey == 'foobar':
-            return {'sub': 'foo'}
+        if apikey == "foobar":
+            return {"sub": "foo"}
         return None
+
     def apikey2_info(apikey, required_scopes=None):
-        if apikey == 'bar':
-            return {'sub': 'bar'}
+        if apikey == "bar":
+            return {"sub": "bar"}
         return None
 
-    wrapped_func_key1 = security_handler_factory.verify_api_key(apikey1_info, 'header', 'X-Auth-1')
-    wrapped_func_key2 = security_handler_factory.verify_api_key(apikey2_info, 'header', 'X-Auth-2')
+    wrapped_func_key1 = security_handler_factory.verify_api_key(apikey1_info, "header", "X-Auth-1")
+    wrapped_func_key2 = security_handler_factory.verify_api_key(apikey2_info, "header", "X-Auth-2")
     schemes = {
-        'key1': wrapped_func_key1,
-        'key2': wrapped_func_key2,
+        "key1": wrapped_func_key1,
+        "key2": wrapped_func_key2,
     }
     wrapped_func = security_handler_factory.verify_multiple_schemes(schemes)
 
     # Single key does not succeed
     request = MagicMock()
-    request.headers = {"X-Auth-1": 'foobar'}
+    request.headers = {"X-Auth-1": "foobar"}
 
     assert wrapped_func(request) is security_handler_factory.no_value
 
     request = MagicMock()
-    request.headers = {"X-Auth-2": 'bar'}
+    request.headers = {"X-Auth-2": "bar"}
 
     assert wrapped_func(request) is security_handler_factory.no_value
 
     # Supplying both keys does succeed
     request = MagicMock()
-    request.headers = {
-        "X-Auth-1": 'foobar',
-        "X-Auth-2": 'bar'
-    }
+    request.headers = {"X-Auth-1": "foobar", "X-Auth-2": "bar"}
 
     expected_token_info = {
-        'key1': {'sub': 'foo'},
-        'key2': {'sub': 'bar'},
+        "key1": {"sub": "foo"},
+        "key2": {"sub": "bar"},
     }
     assert wrapped_func(request) == expected_token_info
 
 
 def test_verify_security_oauthproblem(security_handler_factory):
     """Tests whether verify_security raises an OAuthProblem if there are no auth_funcs."""
-    func_to_secure = MagicMock(return_value='func')
+    func_to_secure = MagicMock(return_value="func")
     secured_func = security_handler_factory.verify_security([], func_to_secure)
 
     request = MagicMock()
     with pytest.raises(OAuthProblem) as exc_info:
         secured_func(request)
 
-    assert str(exc_info.value) == '401 Unauthorized: No authorization token provided'
+    assert str(exc_info.value) == "401 Unauthorized: No authorization token provided"
+
 
 @pytest.mark.parametrize(
-    'errors, most_specific',
+    "errors, most_specific",
     [
         ([OAuthProblem()], OAuthProblem),
         ([OAuthProblem(), OAuthScopeProblem([], [])], OAuthScopeProblem),
@@ -235,7 +236,7 @@ def test_verify_security_oauthproblem(security_handler_factory):
         ([OAuthProblem(), OAuthScopeProblem([], []), BadRequestProblem, FiretailException], OAuthScopeProblem),
         ([BadRequestProblem(), FiretailException()], BadRequestProblem),
         ([FiretailException()], FiretailException),
-    ]
+    ],
 )
 def test_raise_most_specific(errors, most_specific, security_handler_factory):
     """Tests whether most specific exception is raised from a list."""
diff --git a/tests/decorators/test_uri_parsing.py b/tests/decorators/test_uri_parsing.py
index 4160b43..0df88ae 100644
--- a/tests/decorators/test_uri_parsing.py
+++ b/tests/decorators/test_uri_parsing.py
@@ -7,17 +7,12 @@
 )
 from werkzeug.datastructures import MultiDict
 
-QUERY1 = MultiDict([("letters", "a"), ("letters", "b,c"),
-                    ("letters", "d,e,f")])
-QUERY2 = MultiDict([("letters", "a"), ("letters", "b|c"),
-                    ("letters", "d|e|f")])
-
-QUERY3 = MultiDict([("letters[eq]", ["a"]), ("letters[eq]", ["b", "c"]),
-                    ("letters[eq]", ["d", "e", "f"])])
-QUERY4 = MultiDict([("letters[eq]", "a"), ("letters[eq]", "b|c"),
-                    ("letters[eq]", "d|e|f")])
-QUERY5 = MultiDict([("letters[eq]", "a"), ("letters[eq]", "b,c"),
-                    ("letters[eq]", "d,e,f")])
+QUERY1 = MultiDict([("letters", "a"), ("letters", "b,c"), ("letters", "d,e,f")])
+QUERY2 = MultiDict([("letters", "a"), ("letters", "b|c"), ("letters", "d|e|f")])
+
+QUERY3 = MultiDict([("letters[eq]", ["a"]), ("letters[eq]", ["b", "c"]), ("letters[eq]", ["d", "e", "f"])])
+QUERY4 = MultiDict([("letters[eq]", "a"), ("letters[eq]", "b|c"), ("letters[eq]", "d|e|f")])
+QUERY5 = MultiDict([("letters[eq]", "a"), ("letters[eq]", "b,c"), ("letters[eq]", "d,e,f")])
 
 QUERY6 = MultiDict([("letters_eq", "a")])
 PATH1 = {"letters": "d,e,f"}
@@ -27,16 +22,20 @@
 MULTI = "multi"
 
 
-@pytest.mark.parametrize("parser_class, expected, query_in, collection_format", [
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY1, CSV),
-        (FirstValueURIParser, ['a'], QUERY1, CSV),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, CSV),
-        (Swagger2URIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (FirstValueURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY2, PIPES),
-        (FirstValueURIParser, ['a'], QUERY2, PIPES),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY2, PIPES)])
+@pytest.mark.parametrize(
+    "parser_class, expected, query_in, collection_format",
+    [
+        (Swagger2URIParser, ["d", "e", "f"], QUERY1, CSV),
+        (FirstValueURIParser, ["a"], QUERY1, CSV),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, CSV),
+        (Swagger2URIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (FirstValueURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (Swagger2URIParser, ["d", "e", "f"], QUERY2, PIPES),
+        (FirstValueURIParser, ["a"], QUERY2, PIPES),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY2, PIPES),
+    ],
+)
 def test_uri_parser_query_params(parser_class, expected, query_in, collection_format):
     class Request:
         query = query_in
@@ -45,11 +44,13 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters",
-         "in": "query",
-         "type": "array",
-         "items": {"type": "string"},
-         "collectionFormat": collection_format}
+        {
+            "name": "letters",
+            "in": "query",
+            "type": "array",
+            "items": {"type": "string"},
+            "collectionFormat": collection_format,
+        }
     ]
     body_defn = {}
     p = parser_class(parameters, body_defn)
@@ -57,16 +58,20 @@ class Request:
     assert res.query["letters"] == expected
 
 
-@pytest.mark.parametrize("parser_class, expected, query_in, collection_format", [
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY1, CSV),
-        (FirstValueURIParser, ['a'], QUERY1, CSV),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, CSV),
-        (Swagger2URIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (FirstValueURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY1, MULTI),
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY2, PIPES),
-        (FirstValueURIParser, ['a'], QUERY2, PIPES),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY2, PIPES)])
+@pytest.mark.parametrize(
+    "parser_class, expected, query_in, collection_format",
+    [
+        (Swagger2URIParser, ["d", "e", "f"], QUERY1, CSV),
+        (FirstValueURIParser, ["a"], QUERY1, CSV),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, CSV),
+        (Swagger2URIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (FirstValueURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY1, MULTI),
+        (Swagger2URIParser, ["d", "e", "f"], QUERY2, PIPES),
+        (FirstValueURIParser, ["a"], QUERY2, PIPES),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY2, PIPES),
+    ],
+)
 def test_uri_parser_form_params(parser_class, expected, query_in, collection_format):
     class Request:
         query = {}
@@ -75,11 +80,13 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters",
-         "in": "formData",
-         "type": "array",
-         "items": {"type": "string"},
-         "collectionFormat": collection_format}
+        {
+            "name": "letters",
+            "in": "formData",
+            "type": "array",
+            "items": {"type": "string"},
+            "collectionFormat": collection_format,
+        }
     ]
     body_defn = {}
     p = parser_class(parameters, body_defn)
@@ -87,13 +94,17 @@ class Request:
     assert res.form["letters"] == expected
 
 
-@pytest.mark.parametrize("parser_class, expected, query_in, collection_format", [
-        (Swagger2URIParser, ['d', 'e', 'f'], PATH1, CSV),
-        (FirstValueURIParser, ['d', 'e', 'f'], PATH1, CSV),
-        (AlwaysMultiURIParser, ['d', 'e', 'f'], PATH1, CSV),
-        (Swagger2URIParser, ['d', 'e', 'f'], PATH2, PIPES),
-        (FirstValueURIParser, ['d', 'e', 'f'], PATH2, PIPES),
-        (AlwaysMultiURIParser, ['d', 'e', 'f'], PATH2, PIPES)])
+@pytest.mark.parametrize(
+    "parser_class, expected, query_in, collection_format",
+    [
+        (Swagger2URIParser, ["d", "e", "f"], PATH1, CSV),
+        (FirstValueURIParser, ["d", "e", "f"], PATH1, CSV),
+        (AlwaysMultiURIParser, ["d", "e", "f"], PATH1, CSV),
+        (Swagger2URIParser, ["d", "e", "f"], PATH2, PIPES),
+        (FirstValueURIParser, ["d", "e", "f"], PATH2, PIPES),
+        (AlwaysMultiURIParser, ["d", "e", "f"], PATH2, PIPES),
+    ],
+)
 def test_uri_parser_path_params(parser_class, expected, query_in, collection_format):
     class Request:
         query = {}
@@ -102,11 +113,13 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters",
-         "in": "path",
-         "type": "array",
-         "items": {"type": "string"},
-         "collectionFormat": collection_format}
+        {
+            "name": "letters",
+            "in": "path",
+            "type": "array",
+            "items": {"type": "string"},
+            "collectionFormat": collection_format,
+        }
     ]
     body_defn = {}
     p = parser_class(parameters, body_defn)
@@ -114,14 +127,18 @@ class Request:
     assert res.path_params["letters"] == expected
 
 
-@pytest.mark.parametrize("parser_class, expected, query_in, collection_format", [
-        (OpenAPIURIParser, ['d', 'e', 'f'], QUERY3, None),
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY5, CSV),
-        (FirstValueURIParser, ['a'], QUERY5, CSV),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY5, CSV),
-        (Swagger2URIParser, ['d', 'e', 'f'], QUERY4, PIPES),
-        (FirstValueURIParser, ['a'], QUERY4, PIPES),
-        (AlwaysMultiURIParser, ['a', 'b', 'c', 'd', 'e', 'f'], QUERY4, PIPES)])
+@pytest.mark.parametrize(
+    "parser_class, expected, query_in, collection_format",
+    [
+        (OpenAPIURIParser, ["d", "e", "f"], QUERY3, None),
+        (Swagger2URIParser, ["d", "e", "f"], QUERY5, CSV),
+        (FirstValueURIParser, ["a"], QUERY5, CSV),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY5, CSV),
+        (Swagger2URIParser, ["d", "e", "f"], QUERY4, PIPES),
+        (FirstValueURIParser, ["a"], QUERY4, PIPES),
+        (AlwaysMultiURIParser, ["a", "b", "c", "d", "e", "f"], QUERY4, PIPES),
+    ],
+)
 def test_uri_parser_query_params_with_square_brackets(parser_class, expected, query_in, collection_format):
     class Request:
         query = query_in
@@ -130,28 +147,35 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters[eq]",
-         "in": "query",
-         "type": "array",
-         "items": {"type": "string"},
-         "collectionFormat": collection_format}
+        {
+            "name": "letters[eq]",
+            "in": "query",
+            "type": "array",
+            "items": {"type": "string"},
+            "collectionFormat": collection_format,
+        }
     ]
     body_defn = {}
     p = parser_class(parameters, body_defn)
     res = p(lambda x: x)(request)
     assert res.query["letters[eq]"] == expected
 
-@pytest.mark.parametrize("parser_class, expected, query_in, collection_format", [
-        (OpenAPIURIParser, ['a'], QUERY6, CSV),
-        (Swagger2URIParser, ['a'], QUERY6, CSV),
-        (FirstValueURIParser, ['a'], QUERY6, CSV),
-        (AlwaysMultiURIParser, ['a'], QUERY6, CSV),
-        (Swagger2URIParser, ['a'], QUERY6, MULTI),
-        (FirstValueURIParser, ['a'], QUERY6, MULTI),
-        (AlwaysMultiURIParser, ['a'], QUERY6, MULTI),
-        (Swagger2URIParser, ['a'], QUERY6, PIPES),
-        (FirstValueURIParser, ['a'], QUERY6, PIPES),
-        (AlwaysMultiURIParser, ['a'], QUERY6, PIPES)])
+
+@pytest.mark.parametrize(
+    "parser_class, expected, query_in, collection_format",
+    [
+        (OpenAPIURIParser, ["a"], QUERY6, CSV),
+        (Swagger2URIParser, ["a"], QUERY6, CSV),
+        (FirstValueURIParser, ["a"], QUERY6, CSV),
+        (AlwaysMultiURIParser, ["a"], QUERY6, CSV),
+        (Swagger2URIParser, ["a"], QUERY6, MULTI),
+        (FirstValueURIParser, ["a"], QUERY6, MULTI),
+        (AlwaysMultiURIParser, ["a"], QUERY6, MULTI),
+        (Swagger2URIParser, ["a"], QUERY6, PIPES),
+        (FirstValueURIParser, ["a"], QUERY6, PIPES),
+        (AlwaysMultiURIParser, ["a"], QUERY6, PIPES),
+    ],
+)
 def test_uri_parser_query_params_with_underscores(parser_class, expected, query_in, collection_format):
     class Request:
         query = query_in
@@ -160,11 +184,13 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters",
-         "in": "query",
-         "type": "string",
-         "items": {"type": "string"},
-         "collectionFormat": collection_format}
+        {
+            "name": "letters",
+            "in": "query",
+            "type": "string",
+            "items": {"type": "string"},
+            "collectionFormat": collection_format,
+        }
     ]
     body_defn = {}
     p = parser_class(parameters, body_defn)
@@ -172,10 +198,19 @@ class Request:
     assert res.query["letters_eq"] == expected
 
 
-@pytest.mark.parametrize("parser_class, query_in, collection_format, explode, expected", [
-        (OpenAPIURIParser, MultiDict([("letters[eq]_unrelated", "a")]), None, False,{"letters[eq]_unrelated": ["a"]}),
-        (OpenAPIURIParser, MultiDict([("letters[eq][unrelated]", "a")]), "csv", True,{"letters[eq][unrelated]": ["a"]}),
-    ])
+@pytest.mark.parametrize(
+    "parser_class, query_in, collection_format, explode, expected",
+    [
+        (OpenAPIURIParser, MultiDict([("letters[eq]_unrelated", "a")]), None, False, {"letters[eq]_unrelated": ["a"]}),
+        (
+            OpenAPIURIParser,
+            MultiDict([("letters[eq][unrelated]", "a")]),
+            "csv",
+            True,
+            {"letters[eq][unrelated]": ["a"]},
+        ),
+    ],
+)
 def test_uri_parser_query_params_with_malformed_names(parser_class, query_in, collection_format, explode, expected):
     class Request:
         query = query_in
@@ -184,14 +219,15 @@ class Request:
 
     request = Request()
     parameters = [
-        {"name": "letters[eq]",
-         "in": "query",
-         "explode": explode,
-         "collectionFormat": collection_format,
-         "schema": {
-            "type": "array",
-            "items": {"type": "string"},
-         }
+        {
+            "name": "letters[eq]",
+            "in": "query",
+            "explode": explode,
+            "collectionFormat": collection_format,
+            "schema": {
+                "type": "array",
+                "items": {"type": "string"},
+            },
         }
     ]
     body_defn = {}
diff --git a/tests/decorators/test_validation.py b/tests/decorators/test_validation.py
index 49d3788..c267f18 100644
--- a/tests/decorators/test_validation.py
+++ b/tests/decorators/test_validation.py
@@ -8,60 +8,66 @@
 
 
 def test_get_valid_parameter():
-    result = ParameterValidator.validate_parameter('formdata', 20, {'type': 'number', 'name': 'foobar'})
+    result = ParameterValidator.validate_parameter("formdata", 20, {"type": "number", "name": "foobar"})
     assert result is None
 
 
 def test_get_valid_parameter_with_required_attr():
-    param = {'type': 'number', 'required': True, 'name': 'foobar'}
-    result = ParameterValidator.validate_parameter('formdata', 20, param)
+    param = {"type": "number", "required": True, "name": "foobar"}
+    result = ParameterValidator.validate_parameter("formdata", 20, param)
     assert result is None
 
 
 def test_get_valid_path_parameter():
-    param = {'required': True, 'schema': {'type': 'number'}, 'name': 'foobar'}
-    result = ParameterValidator.validate_parameter('path', 20, param)
+    param = {"required": True, "schema": {"type": "number"}, "name": "foobar"}
+    result = ParameterValidator.validate_parameter("path", 20, param)
     assert result is None
 
 
 def test_get_missing_required_parameter():
-    param = {'type': 'number', 'required': True, 'name': 'foo'}
-    result = ParameterValidator.validate_parameter('formdata', None, param)
+    param = {"type": "number", "required": True, "name": "foo"}
+    result = ParameterValidator.validate_parameter("formdata", None, param)
     assert result == "Missing formdata parameter 'foo'"
 
 
 def test_get_x_nullable_parameter():
-    param = {'type': 'number', 'required': True, 'name': 'foo', 'x-nullable': True}
-    result = ParameterValidator.validate_parameter('formdata', 'None', param)
+    param = {"type": "number", "required": True, "name": "foo", "x-nullable": True}
+    result = ParameterValidator.validate_parameter("formdata", "None", param)
     assert result is None
 
 
 def test_get_nullable_parameter():
-    param = {'schema': {'type': 'number', 'nullable': True},
-             'required': True, 'name': 'foo'}
-    result = ParameterValidator.validate_parameter('query', 'null', param)
+    param = {"schema": {"type": "number", "nullable": True}, "required": True, "name": "foo"}
+    result = ParameterValidator.validate_parameter("query", "null", param)
     assert result is None
 
 
 def test_get_explodable_object_parameter():
-    param = {'schema': {'type': 'object', 'additionalProperties': True},
-             'required': True, 'name': 'foo', 'style': 'deepObject', 'explode': True}
-    result = ParameterValidator.validate_parameter('query', {'bar': 1}, param)
+    param = {
+        "schema": {"type": "object", "additionalProperties": True},
+        "required": True,
+        "name": "foo",
+        "style": "deepObject",
+        "explode": True,
+    }
+    result = ParameterValidator.validate_parameter("query", {"bar": 1}, param)
     assert result is None
-    
-    
+
+
 def test_get_valid_parameter_with_enum_array_header():
-    value = 'VALUE1,VALUE2'
-    param = {'schema': {'type': 'array', 'items': {'type': 'string', 'enum': ['VALUE1', 'VALUE2']}},
-             'name': 'test_header_param'}
-    result = ParameterValidator.validate_parameter('header', value, param)
+    value = "VALUE1,VALUE2"
+    param = {
+        "schema": {"type": "array", "items": {"type": "string", "enum": ["VALUE1", "VALUE2"]}},
+        "name": "test_header_param",
+    }
+    result = ParameterValidator.validate_parameter("header", value, param)
     assert result is None
 
 
 def test_invalid_type(monkeypatch):
     logger = MagicMock()
-    monkeypatch.setattr('firetail.decorators.validation.logger', logger)
-    result = ParameterValidator.validate_parameter('formdata', 20, {'type': 'string', 'name': 'foo'})
+    monkeypatch.setattr("firetail.decorators.validation.logger", logger)
+    result = ParameterValidator.validate_parameter("formdata", 20, {"type": "string", "name": "foo"})
     expected_result = """20 is not of type 'string'
 
 Failed validating 'type' in schema:
@@ -75,19 +81,18 @@ def test_invalid_type(monkeypatch):
 
 def test_invalid_type_value_error(monkeypatch):
     logger = MagicMock()
-    monkeypatch.setattr('firetail.decorators.validation.logger', logger)
-    value = {'test': 1, 'second': 2}
-    result = ParameterValidator.validate_parameter('formdata', value, {'type': 'boolean', 'name': 'foo'})
+    monkeypatch.setattr("firetail.decorators.validation.logger", logger)
+    value = {"test": 1, "second": 2}
+    result = ParameterValidator.validate_parameter("formdata", value, {"type": "boolean", "name": "foo"})
     assert result == "Wrong type, expected 'boolean' for formdata parameter 'foo'"
 
 
 def test_enum_error(monkeypatch):
     logger = MagicMock()
-    monkeypatch.setattr('firetail.decorators.validation.logger', logger)
-    value = 'INVALID'
-    param = {'schema': {'type': 'string', 'enum': ['valid']},
-             'name': 'test_path_param'}
-    result = ParameterValidator.validate_parameter('path', value, param)
+    monkeypatch.setattr("firetail.decorators.validation.logger", logger)
+    value = "INVALID"
+    param = {"schema": {"type": "string", "enum": ["valid"]}, "name": "test_path_param"}
+    result = ParameterValidator.validate_parameter("path", value, param)
     assert result.startswith("'INVALID' is not one of ['valid']")
 
 
@@ -122,10 +127,7 @@ def test_support_nullable_properties_not_iterable():
 
 
 def test_nullable_enum():
-    schema = {
-        "enum": ["foo", 7],
-        "nullable": True
-    }
+    schema = {"enum": ["foo", 7], "nullable": True}
     try:
         Draft4RequestValidator(schema).validate(None)
     except ValidationError:
@@ -133,9 +135,7 @@ def test_nullable_enum():
 
 
 def test_nullable_enum_error():
-    schema = {
-        "enum": ["foo", 7]
-    }
+    schema = {"enum": ["foo", 7]}
     with pytest.raises(ValidationError):
         Draft4RequestValidator(schema).validate(None)
 
@@ -186,7 +186,7 @@ def test_formdata_extra_parameter_strict():
     """Tests that firetail handles explicitly defined formData parameters well across Swagger 2
     and OpenApi 3. In Swagger 2, any formData parameter should be defined explicitly, while in
     OpenAPI 3 this is not allowed. See issues #1020 #1160 #1340 #1343."""
-    request = MagicMock(form={'param': 'value', 'extra_param': 'extra_value'})
+    request = MagicMock(form={"param": "value", "extra_param": "extra_value"})
 
     # OAS3
     validator = ParameterValidator([], FlaskApi, strict_validation=True)
@@ -194,7 +194,6 @@ def test_formdata_extra_parameter_strict():
     assert not errors
 
     # Swagger 2
-    validator = ParameterValidator([{'in': 'formData', 'name': 'param'}], FlaskApi,
-                                   strict_validation=True)
+    validator = ParameterValidator([{"in": "formData", "name": "param"}], FlaskApi, strict_validation=True)
     errors = validator.validate_formdata_parameter_list(request)
     assert errors
diff --git a/tests/fakeapi/__init__.py b/tests/fakeapi/__init__.py
index c47fe10..aedecd2 100644
--- a/tests/fakeapi/__init__.py
+++ b/tests/fakeapi/__init__.py
@@ -2,4 +2,4 @@
 
 
 def get():
-    return ''
+    return ""
diff --git a/tests/fakeapi/aiohttp_handlers.py b/tests/fakeapi/aiohttp_handlers.py
index f9c07c0..9a2f93a 100755
--- a/tests/fakeapi/aiohttp_handlers.py
+++ b/tests/fakeapi/aiohttp_handlers.py
@@ -9,11 +9,11 @@
 
 
 async def get_bye(name):
-    return AioHttpResponse(text=f'Goodbye {name}')
+    return AioHttpResponse(text=f"Goodbye {name}")
 
 
 async def aiohttp_str_response():
-    return 'str response'
+    return "str response"
 
 
 async def aiohttp_non_str_non_json_response():
@@ -21,7 +21,7 @@ async def aiohttp_non_str_non_json_response():
 
 
 async def aiohttp_bytes_response():
-    return b'bytes response'
+    return b"bytes response"
 
 
 async def aiohttp_validate_responses():
@@ -29,9 +29,10 @@ async def aiohttp_validate_responses():
 
 
 async def aiohttp_post_greeting(name, **kwargs):
-    data = {'greeting': f'Hello {name}'}
+    data = {"greeting": f"Hello {name}"}
     return data
 
+
 async def aiohttp_echo(**kwargs):
     return aiohttp.web.json_response(data=kwargs, status=200)
 
@@ -43,21 +44,18 @@ async def aiohttp_access_request_context(request_ctx):
 
 
 async def aiohttp_query_parsing_str(query):
-    return {'query': query}
+    return {"query": query}
 
 
 async def aiohttp_query_parsing_array(query):
-    return {'query': query}
+    return {"query": query}
 
 
 async def aiohttp_query_parsing_array_multi(query):
-    return {'query': query}
+    return {"query": query}
 
 
-USERS = [
-    {"id": 1, "name": "John Doe"},
-    {"id": 2, "name": "Nick Carlson"}
-]
+USERS = [{"id": 1, "name": "John Doe"}, {"id": 2, "name": "Nick Carlson"}]
 
 
 async def aiohttp_users_get(*args):
@@ -66,10 +64,8 @@ async def aiohttp_users_get(*args):
 
 async def aiohttp_users_post(user):
     if "name" not in user:
-        return FiretailResponse(body={"error": "name is undefined"},
-                                 status_code=400,
-                                 content_type='application/json')
-    user['id'] = len(USERS) + 1
+        return FiretailResponse(body={"error": "name is undefined"}, status_code=400, content_type="application/json")
+    user["id"] = len(USERS) + 1
     USERS.append(user)
     return aiohttp.web.json_response(data=USERS[-1], status=201)
 
@@ -93,59 +89,55 @@ async def aiohttp_bearer_auth(token_info):
 async def aiohttp_async_bearer_auth(token_info):
     return await aiohttp_token_info(token_info)
 
+
 async def aiohttp_async_auth_exception(token_info):
     return await aiohttp_token_info(token_info)
 
+
 async def get_datetime():
-    return FiretailResponse(body={'value': datetime.datetime(2000, 1, 2, 3, 4, 5, 6)})
+    return FiretailResponse(body={"value": datetime.datetime(2000, 1, 2, 3, 4, 5, 6)})
 
 
 async def get_date():
-    return FiretailResponse(body={'value': datetime.date(2000, 1, 2)})
+    return FiretailResponse(body={"value": datetime.date(2000, 1, 2)})
 
 
 async def get_uuid():
-    return FiretailResponse(body={'value': uuid.UUID(hex='e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51')})
+    return FiretailResponse(body={"value": uuid.UUID(hex="e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51")})
 
 
 async def aiohttp_multipart_single_file(myfile):
     return aiohttp.web.json_response(
-        data={
-            'fileName': myfile.filename,
-            'myfile_content': myfile.file.read().decode('utf8')
-        },
+        data={"fileName": myfile.filename, "myfile_content": myfile.file.read().decode("utf8")},
     )
 
 
 async def aiohttp_multipart_many_files(myfiles):
     return aiohttp.web.json_response(
-        data={
-            'files_count': len(myfiles),
-            'myfiles_content': [ f.file.read().decode('utf8') for f in myfiles ]
-        },
+        data={"files_count": len(myfiles), "myfiles_content": [f.file.read().decode("utf8") for f in myfiles]},
     )
 
 
 async def aiohttp_multipart_mixed_single_file(myfile, body):
-    dir_name = body['dir_name']
+    dir_name = body["dir_name"]
     return aiohttp.web.json_response(
         data={
-            'dir_name': dir_name,
-            'fileName': myfile.filename,
-            'myfile_content': myfile.file.read().decode('utf8'),
+            "dir_name": dir_name,
+            "fileName": myfile.filename,
+            "myfile_content": myfile.file.read().decode("utf8"),
         },
     )
 
 
 async def aiohttp_multipart_mixed_many_files(myfiles, body):
-    dir_name = body['dir_name']
-    test_count = body['test_count']
+    dir_name = body["dir_name"]
+    test_count = body["test_count"]
     return aiohttp.web.json_response(
         data={
-            'files_count': len(myfiles),
-            'dir_name': dir_name,
-            'test_count': test_count,
-            'myfiles_content': [ f.file.read().decode('utf8') for f in myfiles ]
+            "files_count": len(myfiles),
+            "dir_name": dir_name,
+            "test_count": test_count,
+            "myfiles_content": [f.file.read().decode("utf8") for f in myfiles],
         },
     )
 
diff --git a/tests/fakeapi/auth.py b/tests/fakeapi/auth.py
index 9cbaa0b..81cf0fb 100644
--- a/tests/fakeapi/auth.py
+++ b/tests/fakeapi/auth.py
@@ -6,7 +6,7 @@
 
 def fake_basic_auth(username, password, required_scopes=None):
     if username == password:
-        return {'uid': username}
+        return {"uid": username}
     return None
 
 
@@ -28,5 +28,6 @@ async def async_json_auth(token, required_scopes=None, request=None):
 async def async_scope_validation(required_scopes, token_scopes, request):
     return required_scopes == token_scopes
 
+
 async def async_auth_exception(token, required_scopes=None, request=None):
     raise OAuthProblem
diff --git a/tests/fakeapi/example_method_view.py b/tests/fakeapi/example_method_view.py
index 65f91da..13167ba 100644
--- a/tests/fakeapi/example_method_view.py
+++ b/tests/fakeapi/example_method_view.py
@@ -2,14 +2,19 @@
 
 
 class ExampleMethodView(MethodView):
-    mycontent="demonstrate return from MethodView class"
+    mycontent = "demonstrate return from MethodView class"
+
     def get(self):
-      return self.mycontent
+        return self.mycontent
+
     def search(self):
-      return self.mycontent
+        return self.mycontent
+
     def api_list(self):
-      return self.mycontent
+        return self.mycontent
+
     def post_greeting(self):
-      return self.mycontent
+        return self.mycontent
+
     def post(self):
-      return self.mycontent
+        return self.mycontent
diff --git a/tests/fakeapi/foo_bar.py b/tests/fakeapi/foo_bar.py
index 3b68520..ff0154d 100755
--- a/tests/fakeapi/foo_bar.py
+++ b/tests/fakeapi/foo_bar.py
@@ -2,4 +2,4 @@
 
 
 def search():
-    return ''
+    return ""
diff --git a/tests/fakeapi/hello/__init__.py b/tests/fakeapi/hello/__init__.py
index a6c72e4..e648884 100644
--- a/tests/fakeapi/hello/__init__.py
+++ b/tests/fakeapi/hello/__init__.py
@@ -15,98 +15,105 @@ def test_classmethod(cls):
     def test_method(self):
         return self.__class__.__name__
 
+
 class_instance = DummyClass()  # noqa
 
 
 def get():
-    return ''
+    return ""
 
 
 def search():
-    return ''
+    return ""
 
 
 def api_list():
-    return 'a'
+    return "a"
 
 
 def post():
-    return ''
+    return ""
 
 
 def post_greeting(name, **kwargs):
-    data = {'greeting': f'Hello {name}'}
+    data = {"greeting": f"Hello {name}"}
     return data
 
+
 def post_greeting3(body, **kwargs):
-    data = {'greeting': 'Hello {name}'.format(name=body["name"])}
+    data = {"greeting": "Hello {name}".format(name=body["name"])}
     return data
 
+
 def post_greeting_url(name, remainder, **kwargs):
-    data = {'greeting': f'Hello {name} thanks for {remainder}'}
+    data = {"greeting": f"Hello {name} thanks for {remainder}"}
     return data
 
+
 def post_goodday(name):
-    data = {'greeting': f'Hello {name}'}
+    data = {"greeting": f"Hello {name}"}
     headers = {"Location": "/my/uri"}
     return data, 201, headers
 
 
 def post_goodday_no_header():
-    return {'greeting': 'Hello.'}, 201
+    return {"greeting": "Hello."}, 201
 
 
 def post_goodevening(name):
-    data = f'Good evening {name}'
+    data = f"Good evening {name}"
     headers = {"Location": "/my/uri"}
     return data, 201, headers
 
 
 def get_list(name):
-    data = ['hello', name]
+    data = ["hello", name]
     return data
 
 
 def get_bye(name):
-    return f'Goodbye {name}'
+    return f"Goodbye {name}"
 
 
 def get_flask_response_tuple():
-    return jsonify({'foo': 'bar'}), 201
+    return jsonify({"foo": "bar"}), 201
 
 
 def get_bye_secure(name, user, token_info):
-    return f'Goodbye {name} (Secure: {user})'
+    return f"Goodbye {name} (Secure: {user})"
 
 
 def get_bye_secure_from_flask():
-    return 'Goodbye {user} (Secure!)'.format(user=context['user'])
+    return "Goodbye {user} (Secure!)".format(user=context["user"])
 
 
 def get_bye_secure_from_firetail(req_context):
-    return 'Goodbye {user} (Secure!)'.format(user=req_context['user'])
+    return "Goodbye {user} (Secure!)".format(user=req_context["user"])
 
 
 def get_bye_secure_ignoring_context(name):
-    return f'Goodbye {name} (Secure!)'
+    return f"Goodbye {name} (Secure!)"
+
 
 def get_bye_secure_jwt(name, user, token_info):
-    return f'Goodbye {name} (Secure: {user})'
+    return f"Goodbye {name} (Secure: {user})"
+
 
 def with_problem():
-    raise ProblemException(type='http://www.example.com/error',
-                           title='Some Error',
-                           detail='Something went wrong somewhere',
-                           status=418,
-                           instance='instance1',
-                           headers={'x-Test-Header': 'In Test'})
+    raise ProblemException(
+        type="http://www.example.com/error",
+        title="Some Error",
+        detail="Something went wrong somewhere",
+        status=418,
+        instance="instance1",
+        headers={"x-Test-Header": "In Test"},
+    )
 
 
 def with_problem_txt():
-    raise ProblemException(title='Some Error',
-                           detail='Something went wrong somewhere',
-                           status=418,
-                           instance='instance1')
+    raise ProblemException(
+        title="Some Error", detail="Something went wrong somewhere", status=418, instance="instance1"
+    )
 
 
 def internal_error():
@@ -117,12 +124,12 @@ def get_greetings(name):
     """
     Used to test custom mimetypes
     """
-    data = {'greetings': f'Hello {name}'}
+    data = {"greetings": f"Hello {name}"}
     return data
 
 
 def multimime():
-    return 'Goodbye'
+    return "Goodbye"
 
 
 def empty():
@@ -177,49 +184,43 @@ def schema_response_boolean(valid):
 
 def schema_response_array(valid):
     if valid == "invalid_dict":
-        return {
-            {"image_version": "1.0"}:
-                {"image_version": "2.0"}
-        }
+        return {{"image_version": "1.0"}: {"image_version": "2.0"}}
     elif valid == "invalid_string":
         return "Not an array."
     else:
-        return [
-            {"image_version": "1.0"},
-            {"image_version": "2.0"}
-        ]
+        return [{"image_version": "1.0"}, {"image_version": "2.0"}]
 
 
 def schema_query(image_version=None):
-    return {'image_version': image_version}
+    return {"image_version": image_version}
 
 
 def schema_list():
-    return ''
+    return ""
 
 
 def schema_map():
-    return ''
+    return ""
 
 
 def schema_recursive():
-    return ''
+    return ""
 
 
 def schema_format():
-    return ''
+    return ""
 
 
 def test_parameter_validation():
-    return ''
+    return ""
 
 
 def test_required_query_param():
-    return ''
+    return ""
 
 
 def test_apikey_query_parameter_validation():
-    return ''
+    return ""
 
 
 def test_array_csv_query_param(items):
@@ -227,11 +228,11 @@ def test_array_csv_query_param(items):
 
 
 def test_array_pipes_form_param3(items):
-    return items['items']
+    return items["items"]
 
 
 def test_array_csv_form_param3(items):
-    return items['items']
+    return items["items"]
 
 
 def test_array_pipes_form_param(items):
@@ -267,11 +268,11 @@ def test_schema_int(test_int):
 
 
 def test_get_someint(someint):
-    return f'{type(someint).__name__} {someint:g}'
+    return f"{type(someint).__name__} {someint:g}"
 
 
 def test_get_somefloat(somefloat):
-    return f'{type(somefloat).__name__} {somefloat:g}'
+    return f"{type(somefloat).__name__} {somefloat:g}"
 
 
 def test_default_param(name):
@@ -281,9 +282,11 @@ def test_default_param(name):
 def test_default_object_body(stack):
     return {"stack": stack}
 
+
 def test_nested_additional_properties(body):
     return body
 
+
 def test_default_integer_body(stack_version):
     return stack_version
 
@@ -295,6 +298,7 @@ def test_empty_object_body(stack):
 def test_falsy_param(falsy):
     return falsy
 
+
 def test_formdata_param3(body):
     return body["formData"]
 
@@ -304,17 +308,17 @@ def test_formdata_param(formData):
 
 
 def test_formdata_missing_param():
-    return ''
+    return ""
 
 
 def test_formdata_file_upload(formData, **kwargs):
     filename = formData.filename
-    contents = formData.read().decode('utf-8', 'replace')
+    contents = formData.read().decode("utf-8", "replace")
     return {filename: contents}
 
 
 def test_formdata_file_upload_missing_param():
-    return ''
+    return ""
 
 
 def test_bool_default_param(thruthiness):
@@ -348,21 +352,21 @@ def test_exploded_deep_object_param_additional_properties(id):
 
 
 def test_redirect_endpoint():
-    headers = {'Location': 'http://www.google.com/'}
-    return '', 302, headers
+    headers = {"Location": "http://www.google.com/"}
+    return "", 302, headers
 
 
 def test_redirect_response_endpoint():
-    return redirect('http://www.google.com/')
+    return redirect("http://www.google.com/")
 
 
 def test_204_with_headers():
-    headers = {'X-Something': 'test'}
-    return '', 204, headers
+    headers = {"X-Something": "test"}
+    return "", 204, headers
 
 
 def test_nocontent_obj_with_headers():
-    headers = {'X-Something': 'test'}
+    headers = {"X-Something": "test"}
     return NoContent, 204, headers
 
 
@@ -371,7 +375,7 @@ def path_parameters_in_get_method(title):
 
 
 def test_default_missmatch_definition(age):
-    return 'OK'
+    return "OK"
 
 
 def test_array_in_path(names):
@@ -379,52 +383,53 @@ def test_array_in_path(names):
 
 
 def test_global_response_definition():
-    return ['general', 'list'], 200
+    return ["general", "list"], 200
 
 
 def test_nullable_parameters(time_start):
     if time_start is None:
-        return 'it was None'
+        return "it was None"
     return time_start
 
 
 def test_nullable_param_post(post_param):
     if post_param is None:
-        return 'it was None'
+        return "it was None"
     return post_param
 
 
 def test_nullable_param_post3(body):
     if body is None:
-        return 'it was None'
+        return "it was None"
     if body["post_param"] is None:
-        return 'it was None'
+        return "it was None"
     return body["post_param"]
 
 
 def test_nullable_param_put(contents):
     if contents is None:
-        return 'it was None'
+        return "it was None"
     return contents
 
-def test_nullable_param_put_noargs(dummy=''):
-    return 'hello'
+
+def test_nullable_param_put_noargs(dummy=""):
+    return "hello"
 
 
 def test_custom_json_response():
-    return {'theResult': DummyClass()}, 200
+    return {"theResult": DummyClass()}, 200
 
 
 def get_blob_data():
-    return b'cool\x00\x08'
+    return b"cool\x00\x08"
 
 
 def get_data_as_binary():
-    return get_blob_data(), 200, {'Content-Type': 'application/octet-stream'}
+    return get_blob_data(), 200, {"Content-Type": "application/octet-stream"}
 
 
 def get_data_as_text(post_param):
-    return ''
+    return ""
 
 
 def get_invalid_response():
@@ -436,16 +441,11 @@ def get_empty_dict():
 
 
 def get_custom_problem_response():
-    raise ProblemException(403, "You need to pay", "Missing amount",
-                           ext={'amount': 23.0})
+    raise ProblemException(403, "You need to pay", "Missing amount", ext={"amount": 23.0})
 
 
 def throw_problem_exception():
-    raise ProblemException(
-        title="As Exception",
-        detail="Something wrong or not!",
-        ext={'age': 30}
-    )
+    raise ProblemException(title="As Exception", detail="Something wrong or not!", ext={"age": 30})
 
 
 def unordered_params_response(first, path_param, second):
@@ -457,7 +457,7 @@ def more_than_one_scope_defined(**kwargs):
 
 
 def optional_auth(**kwargs):
-    key = apikey_info(request.headers.get('X-AUTH'))
+    key = apikey_info(request.headers.get("X-AUTH"))
     if key is None:
         return "Unauthenticated"
     else:
@@ -465,11 +465,13 @@ def optional_auth(**kwargs):
 
 
 def auth_exception():
-    return 'foo'
+    return "foo"
+
 
 def test_args_kwargs(*args, **kwargs):
     return kwargs
 
+
 def test_args_kwargs_post(*args, **kwargs):
     return kwargs
 
@@ -477,51 +479,57 @@ def test_args_kwargs_post(*args, **kwargs):
 def test_param_sanitization(query=None, form=None):
     result = {}
     if query:
-        result['query'] = query
+        result["query"] = query
     if form:
-        result['form'] = form
+        result["form"] = form
     return result
 
 
 def test_param_sanitization3(query=None, body=None):
     result = {}
     if query:
-        result['query'] = query
+        result["query"] = query
     if body:
-        result['form'] = body["$form"]
+        result["form"] = body["$form"]
     return result
 
 
 def test_body_sanitization(body=None):
     return body
 
+
 def test_body_sanitization_additional_properties(body):
     return body
 
+
 def test_body_sanitization_additional_properties_defined(body):
     return body
 
+
 def test_body_not_allowed_additional_properties(body):
     return body
 
+
 def post_wrong_content_type():
     return "NOT OK"
 
 
 def get_unicode_query(price=None):
-    return {'price': price}
+    return {"price": price}
 
 
 def get_unicode_data():
-    jsonResponse = {'currency': '\xa3', 'key': 'leena'}
+    jsonResponse = {"currency": "\xa3", "key": "leena"}
     return jsonResponse
 
 
 def get_enum_response():
     try:
         from enum import Enum
+
         class HTTPStatus(Enum):
             OK = 200
+
     except ImportError:
         return {}, 200
     else:
@@ -542,34 +550,35 @@ def get_bad_default_response(response_code):
 
 
 def get_user():
-    return {'user_id': 7, 'name': 'max'}
+    return {"user_id": 7, "name": "max"}
 
 
 def get_user_with_password():
-    return {'user_id': 7, 'name': 'max', 'password': '5678'}
+    return {"user_id": 7, "name": "max", "password": "5678"}
 
 
 def post_user(body):
-    body['user_id'] = 8
-    body.pop('password', None)
+    body["user_id"] = 8
+    body.pop("password", None)
     return body
 
+
 def post_multipart_form(body):
-    x = body['x']
-    x['name'] += "-reply"
-    x['age'] += 10
+    x = body["x"]
+    x["name"] += "-reply"
+    x["age"] += 10
     return x
 
 
 def apikey_info(apikey, required_scopes=None):
-    if apikey == 'mykey':
-        return {'sub': 'admin'}
+    if apikey == "mykey":
+        return {"sub": "admin"}
     return None
 
 
 def jwt_info(token):
-    if token == '100':
-        return {'sub': '100'}
+    if token == "100":
+        return {"sub": "100"}
     return None
 
 
@@ -610,15 +619,15 @@ def trace_add_operation_on_http_methods_only():
 
 
 def get_datetime():
-    return {'value': datetime.datetime(2000, 1, 2, 3, 4, 5, 6)}
+    return {"value": datetime.datetime(2000, 1, 2, 3, 4, 5, 6)}
 
 
 def get_date():
-    return {'value': datetime.date(2000, 1, 2)}
+    return {"value": datetime.date(2000, 1, 2)}
 
 
 def get_uuid():
-    return {'value': uuid.UUID(hex='e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51')}
+    return {"value": uuid.UUID(hex="e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51")}
 
 
 def test_optional_headers():
diff --git a/tests/fakeapi/hello/world.py b/tests/fakeapi/hello/world.py
index 41345e1..5680dd6 100644
--- a/tests/fakeapi/hello/world.py
+++ b/tests/fakeapi/hello/world.py
@@ -1,5 +1,6 @@
 def search(id):
-    return ''
+    return ""
+
 
 def get(id):
-    return ''
+    return ""
diff --git a/tests/fakeapi/module_with_exception.py b/tests/fakeapi/module_with_exception.py
index e8b6427..c5e1ffa 100644
--- a/tests/fakeapi/module_with_exception.py
+++ b/tests/fakeapi/module_with_exception.py
@@ -3,4 +3,4 @@
 #  - `test_operation.py:test_invalid_operation_does_stop_application_to_setup`
 #  - `test_api.py:test_invalid_operation_does_stop_application_to_setup`
 #  - `test_api.py:test_invalid_operation_does_not_stop_application_in_debug_mode`
-raise ValueError('Forced exception!')
+raise ValueError("Forced exception!")
diff --git a/tests/fakeapi/snake_case.py b/tests/fakeapi/snake_case.py
index c5a9551..43c4c32 100755
--- a/tests/fakeapi/snake_case.py
+++ b/tests/fakeapi/snake_case.py
@@ -1,44 +1,44 @@
 #!/usr/bin/env python3
 def get_path_snake(some_id):
-    data = {'SomeId': some_id}
+    data = {"SomeId": some_id}
     return data
 
 
 def get_path_shadow(id_):
-    data = {'id': id_}
+    data = {"id": id_}
     return data
 
 
 def get_query_snake(some_id):
-    data = {'someId': some_id}
+    data = {"someId": some_id}
     return data
 
 
 def get_query_shadow(list_):
-    data = {'list': list_}
+    data = {"list": list_}
     return data
 
 
 def get_camelcase(truthiness, order_by=None):
-    data = {'truthiness': truthiness, 'order_by': order_by}
+    data = {"truthiness": truthiness, "order_by": order_by}
     return data
 
 
 def post_path_snake(some_id, some_other_id):
-    data = {'SomeId': some_id, 'SomeOtherId': some_other_id}
+    data = {"SomeId": some_id, "SomeOtherId": some_other_id}
     return data
 
 
 def post_path_shadow(id_, round_):
-    data = {'id': id_, 'reduce': round_}
+    data = {"id": id_, "reduce": round_}
     return data
 
 
 def post_query_snake(some_id, some_other_id):
-    data = {'someId': some_id, 'someOtherId': some_other_id}
+    data = {"someId": some_id, "someOtherId": some_other_id}
     return data
 
 
 def post_query_shadow(id_, class_, next_):
-    data = {'id': id_, 'class': class_, 'next': next_}
+    data = {"id": id_, "class": class_, "next": next_}
     return data
diff --git a/tests/test_api.py b/tests/test_api.py
index 3a9e9fd..a81abe8 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -13,98 +13,118 @@
 
 
 def test_canonical_base_path():
-    assert canonical_base_path('') == ''
-    assert canonical_base_path('/') == ''
-    assert canonical_base_path('/api') == '/api'
-    assert canonical_base_path('/api/') == '/api'
+    assert canonical_base_path("") == ""
+    assert canonical_base_path("/") == ""
+    assert canonical_base_path("/api") == "/api"
+    assert canonical_base_path("/api/") == "/api"
 
 
 def test_api():
     api = FlaskApi(TEST_FOLDER / "fixtures/simple/swagger.yaml", base_path="/api/v1.0")
-    assert api.blueprint.name == '/api/v1_0'
-    assert api.blueprint.url_prefix == '/api/v1.0'
+    assert api.blueprint.name == "/api/v1_0"
+    assert api.blueprint.url_prefix == "/api/v1.0"
 
     api2 = FlaskApi(TEST_FOLDER / "fixtures/simple/swagger.yaml")
-    assert api2.blueprint.name == '/v1_0'
-    assert api2.blueprint.url_prefix == '/v1.0'
+    assert api2.blueprint.name == "/v1_0"
+    assert api2.blueprint.url_prefix == "/v1.0"
 
     api3 = FlaskApi(TEST_FOLDER / "fixtures/simple/openapi.yaml", base_path="/api/v1.0")
-    assert api3.blueprint.name == '/api/v1_0'
-    assert api3.blueprint.url_prefix == '/api/v1.0'
+    assert api3.blueprint.name == "/api/v1_0"
+    assert api3.blueprint.url_prefix == "/api/v1.0"
 
     api4 = FlaskApi(TEST_FOLDER / "fixtures/simple/openapi.yaml")
-    assert api4.blueprint.name == '/v1_0'
-    assert api4.blueprint.url_prefix == '/v1.0'
+    assert api4.blueprint.name == "/v1_0"
+    assert api4.blueprint.url_prefix == "/v1.0"
 
 
 def test_api_base_path_slash():
     api = FlaskApi(TEST_FOLDER / "fixtures/simple/basepath-slash.yaml")
-    assert api.blueprint.name == ''
-    assert api.blueprint.url_prefix == ''
+    assert api.blueprint.name == ""
+    assert api.blueprint.url_prefix == ""
 
 
 def test_template():
-    api1 = FlaskApi(TEST_FOLDER / "fixtures/simple/swagger.yaml",
-                    base_path="/api/v1.0", arguments={'title': 'test'})
-    assert api1.specification['info']['title'] == 'test'
+    api1 = FlaskApi(TEST_FOLDER / "fixtures/simple/swagger.yaml", base_path="/api/v1.0", arguments={"title": "test"})
+    assert api1.specification["info"]["title"] == "test"
 
-    api2 = FlaskApi(TEST_FOLDER / "fixtures/simple/swagger.yaml",
-                    base_path="/api/v1.0", arguments={'title': 'other test'})
-    assert api2.specification['info']['title'] == 'other test'
+    api2 = FlaskApi(
+        TEST_FOLDER / "fixtures/simple/swagger.yaml", base_path="/api/v1.0", arguments={"title": "other test"}
+    )
+    assert api2.specification["info"]["title"] == "other test"
 
 
 def test_invalid_operation_does_stop_application_to_setup():
     with pytest.raises(ImportError):
-        FlaskApi(TEST_FOLDER / "fixtures/op_error_api/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'})
+        FlaskApi(TEST_FOLDER / "fixtures/op_error_api/swagger.yaml", base_path="/api/v1.0", arguments={"title": "OK"})
 
     with pytest.raises(ValueError):
-        FlaskApi(TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'})
+        FlaskApi(TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml", base_path="/api/v1.0", arguments={"title": "OK"})
 
     with pytest.raises(ImportError):
-        FlaskApi(TEST_FOLDER / "fixtures/module_not_implemented/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'})
+        FlaskApi(
+            TEST_FOLDER / "fixtures/module_not_implemented/swagger.yaml",
+            base_path="/api/v1.0",
+            arguments={"title": "OK"},
+        )
 
     with pytest.raises(ValueError):
-        FlaskApi(TEST_FOLDER / "fixtures/user_module_loading_error/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'})
+        FlaskApi(
+            TEST_FOLDER / "fixtures/user_module_loading_error/swagger.yaml",
+            base_path="/api/v1.0",
+            arguments={"title": "OK"},
+        )
 
 
 def test_invalid_operation_does_not_stop_application_in_debug_mode():
-    api = FlaskApi(TEST_FOLDER / "fixtures/op_error_api/swagger.yaml",
-                   base_path="/api/v1.0", arguments={'title': 'OK'}, debug=True)
-    assert api.specification['info']['title'] == 'OK'
-
-    api = FlaskApi(TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml",
-                   base_path="/api/v1.0", arguments={'title': 'OK'}, debug=True)
-    assert api.specification['info']['title'] == 'OK'
-
-    api = FlaskApi(TEST_FOLDER / "fixtures/module_not_implemented/swagger.yaml",
-                   base_path="/api/v1.0", arguments={'title': 'OK'}, debug=True)
-    assert api.specification['info']['title'] == 'OK'
-
-    api = FlaskApi(TEST_FOLDER / "fixtures/user_module_loading_error/swagger.yaml",
-                   base_path="/api/v1.0", arguments={'title': 'OK'}, debug=True)
-    assert api.specification['info']['title'] == 'OK'
+    api = FlaskApi(
+        TEST_FOLDER / "fixtures/op_error_api/swagger.yaml", base_path="/api/v1.0", arguments={"title": "OK"}, debug=True
+    )
+    assert api.specification["info"]["title"] == "OK"
+
+    api = FlaskApi(
+        TEST_FOLDER / "fixtures/missing_op_id/swagger.yaml",
+        base_path="/api/v1.0",
+        arguments={"title": "OK"},
+        debug=True,
+    )
+    assert api.specification["info"]["title"] == "OK"
+
+    api = FlaskApi(
+        TEST_FOLDER / "fixtures/module_not_implemented/swagger.yaml",
+        base_path="/api/v1.0",
+        arguments={"title": "OK"},
+        debug=True,
+    )
+    assert api.specification["info"]["title"] == "OK"
+
+    api = FlaskApi(
+        TEST_FOLDER / "fixtures/user_module_loading_error/swagger.yaml",
+        base_path="/api/v1.0",
+        arguments={"title": "OK"},
+        debug=True,
+    )
+    assert api.specification["info"]["title"] == "OK"
 
 
 def test_other_errors_stop_application_to_setup():
     # Errors should still result exceptions!
     with pytest.raises(InvalidSpecification):
-        FlaskApi(TEST_FOLDER / "fixtures/bad_specs/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'})
+        FlaskApi(TEST_FOLDER / "fixtures/bad_specs/swagger.yaml", base_path="/api/v1.0", arguments={"title": "OK"})
 
 
 def test_invalid_schema_file_structure():
     with pytest.raises(InvalidSpecification):
-        FlaskApi(TEST_FOLDER / "fixtures/invalid_schema/swagger.yaml",
-                 base_path="/api/v1.0", arguments={'title': 'OK'}, debug=True)
+        FlaskApi(
+            TEST_FOLDER / "fixtures/invalid_schema/swagger.yaml",
+            base_path="/api/v1.0",
+            arguments={"title": "OK"},
+            debug=True,
+        )
 
 
 def test_invalid_encoding():
-    with tempfile.NamedTemporaryFile(mode='wb', delete=False) as f:
-        f.write("swagger: '2.0'\ninfo:\n  title: Foo 整\n  version: v1\npaths: {}".encode('gbk'))
+    with tempfile.NamedTemporaryFile(mode="wb", delete=False) as f:
+        f.write("swagger: '2.0'\ninfo:\n  title: Foo 整\n  version: v1\npaths: {}".encode("gbk"))
     FlaskApi(pathlib.Path(f.name), base_path="/api/v1.0")
     os.unlink(f.name)
 
@@ -112,7 +132,7 @@ def test_invalid_encoding():
 def test_use_of_safe_load_for_yaml_swagger_specs():
     with pytest.raises(YAMLError):
         with tempfile.NamedTemporaryFile(delete=False) as f:
-            f.write(b'!!python/object:object {}\n')
+            f.write(b"!!python/object:object {}\n")
         try:
             FlaskApi(pathlib.Path(f.name), base_path="/api/v1.0")
             os.unlink(f.name)
@@ -122,13 +142,14 @@ def test_use_of_safe_load_for_yaml_swagger_specs():
 
 def test_validation_error_on_completely_invalid_swagger_spec():
     with tempfile.NamedTemporaryFile(delete=False) as f:
-        f.write(b'[1]\n')
+        f.write(b"[1]\n")
     with pytest.raises(InvalidSpecification):
         FlaskApi(pathlib.Path(f.name), base_path="/api/v1.0")
     os.unlink(f.name)
 
+
 @pytest.fixture
 def mock_api_logger(monkeypatch):
-    mocked_logger = MagicMock(name='mocked_logger')
-    monkeypatch.setattr('firetail.apis.abstract.logger', mocked_logger)
+    mocked_logger = MagicMock(name="mocked_logger")
+    monkeypatch.setattr("firetail.apis.abstract.logger", mocked_logger)
     return mocked_logger
diff --git a/tests/test_app.py b/tests/test_app.py
index b8e605b..b7976d4 100644
--- a/tests/test_app.py
+++ b/tests/test_app.py
@@ -4,9 +4,9 @@
 
 
 def test_flask_app_default_params():
-    app = FlaskApp('MyApp')
-    assert app.import_name == 'MyApp'
-    assert app.server == 'flask'
+    app = FlaskApp("MyApp")
+    assert app.import_name == "MyApp"
+    assert app.server == "flask"
     assert app.api_cls == FlaskApi
     assert app.arguments == {}
     # debug should be None so that user can use Flask environment variables to set it
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 88ec039..203f9e8 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -20,10 +20,7 @@ def mock_app_run(mock_get_function_from_name):
 @pytest.fixture()
 def mock_get_function_from_name(monkeypatch):
     get_function_from_name = MagicMock()
-    monkeypatch.setattr(
-        'firetail.cli.firetail.utils.get_function_from_name',
-        get_function_from_name
-    )
+    monkeypatch.setattr("firetail.cli.firetail.utils.get_function_from_name", get_function_from_name)
     return get_function_from_name
 
 
@@ -40,195 +37,166 @@ def expected_arguments():
             "swagger_url": None,
         },
         "auth_all_paths": False,
-        "debug": False
+        "debug": False,
     }
 
 
 @pytest.fixture()
 def spec_file():
-    return str(FIXTURES_FOLDER / 'simple/swagger.yaml')
+    return str(FIXTURES_FOLDER / "simple/swagger.yaml")
 
 
 def test_print_version():
     runner = CliRunner()
-    result = runner.invoke(main, ['--version'], catch_exceptions=False)
+    result = runner.invoke(main, ["--version"], catch_exceptions=False)
     assert f"Firetail {firetail.__version__}" in result.output
 
 
 def test_run_missing_spec():
     runner = CliRunner()
-    result = runner.invoke(main, ['run'], catch_exceptions=False)
+    result = runner.invoke(main, ["run"], catch_exceptions=False)
     assert "Missing argument" in result.output
 
 
 def test_run_simple_spec(mock_app_run, spec_file):
     default_port = 5000
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file], catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file], catch_exceptions=False)
 
     app_instance = mock_app_run()
-    app_instance.run.assert_called_with(
-        port=default_port,
-        host=None,
-        server='flask',
-        debug=False)
+    app_instance.run.assert_called_with(port=default_port, host=None, server="flask", debug=False)
 
 
 def test_run_spec_with_host(mock_app_run, spec_file):
     default_port = 5000
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--host', 'custom.host'], catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--host", "custom.host"], catch_exceptions=False)
 
     app_instance = mock_app_run()
-    app_instance.run.assert_called_with(
-        port=default_port,
-        host='custom.host',
-        server='flask',
-        debug=False)
+    app_instance.run.assert_called_with(port=default_port, host="custom.host", server="flask", debug=False)
 
 
 def test_run_no_options_all_default(mock_app_run, expected_arguments, spec_file):
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file], catch_exceptions=False)
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    runner.invoke(main, ["run", spec_file], catch_exceptions=False)
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_hide_spec(mock_app_run, expected_arguments,
-                                           spec_file):
+def test_run_using_option_hide_spec(mock_app_run, expected_arguments, spec_file):
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--hide-spec'],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--hide-spec"], catch_exceptions=False)
 
-    expected_arguments['options']['serve_spec'] = False
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["options"]["serve_spec"] = False
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_hide_console_ui(mock_app_run, expected_arguments,
-                                                 spec_file):
+def test_run_using_option_hide_console_ui(mock_app_run, expected_arguments, spec_file):
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--hide-console-ui'],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--hide-console-ui"], catch_exceptions=False)
 
-    expected_arguments['options']['swagger_ui'] = False
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["options"]["swagger_ui"] = False
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_console_ui_from(mock_app_run, expected_arguments,
-                                           spec_file):
-    user_path = '/some/path/here'
+def test_run_using_option_console_ui_from(mock_app_run, expected_arguments, spec_file):
+    user_path = "/some/path/here"
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--console-ui-from', user_path],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--console-ui-from", user_path], catch_exceptions=False)
 
-    expected_arguments['options']['swagger_path'] = user_path
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["options"]["swagger_path"] = user_path
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_console_ui_url(mock_app_run, expected_arguments,
-                                           spec_file):
-    user_url = '/console_ui_test'
+def test_run_using_option_console_ui_url(mock_app_run, expected_arguments, spec_file):
+    user_url = "/console_ui_test"
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--console-ui-url', user_url],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--console-ui-url", user_url], catch_exceptions=False)
 
-    expected_arguments['options']['swagger_url'] = user_url
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["options"]["swagger_url"] = user_url
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_auth_all_paths(mock_app_run, expected_arguments,
-                                                 spec_file):
+def test_run_using_option_auth_all_paths(mock_app_run, expected_arguments, spec_file):
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--auth-all-paths'],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--auth-all-paths"], catch_exceptions=False)
 
-    expected_arguments['auth_all_paths'] = True
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["auth_all_paths"] = True
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_in_debug_mode(mock_app_run, expected_arguments, spec_file,
-                           monkeypatch):
-    logging_config = MagicMock(name='firetail.cli.logging.basicConfig')
-    monkeypatch.setattr('firetail.cli.logging.basicConfig',
-                        logging_config)
+def test_run_in_debug_mode(mock_app_run, expected_arguments, spec_file, monkeypatch):
+    logging_config = MagicMock(name="firetail.cli.logging.basicConfig")
+    monkeypatch.setattr("firetail.cli.logging.basicConfig", logging_config)
 
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '-d'], catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "-d"], catch_exceptions=False)
 
     logging_config.assert_called_with(level=logging.DEBUG)
 
-    expected_arguments['debug'] = True
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["debug"] = True
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_in_very_verbose_mode(mock_app_run, expected_arguments, spec_file,
-                           monkeypatch):
-    logging_config = MagicMock(name='firetail.cli.logging.basicConfig')
-    monkeypatch.setattr('firetail.cli.logging.basicConfig',
-                        logging_config)
+def test_run_in_very_verbose_mode(mock_app_run, expected_arguments, spec_file, monkeypatch):
+    logging_config = MagicMock(name="firetail.cli.logging.basicConfig")
+    monkeypatch.setattr("firetail.cli.logging.basicConfig", logging_config)
 
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '-vv'], catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "-vv"], catch_exceptions=False)
 
     logging_config.assert_called_with(level=logging.DEBUG)
 
-    expected_arguments['debug'] = True
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["debug"] = True
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_in_verbose_mode(mock_app_run, expected_arguments, spec_file,
-                           monkeypatch):
-    logging_config = MagicMock(name='firetail.cli.logging.basicConfig')
-    monkeypatch.setattr('firetail.cli.logging.basicConfig',
-                        logging_config)
+def test_run_in_verbose_mode(mock_app_run, expected_arguments, spec_file, monkeypatch):
+    logging_config = MagicMock(name="firetail.cli.logging.basicConfig")
+    monkeypatch.setattr("firetail.cli.logging.basicConfig", logging_config)
 
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '-v'], catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "-v"], catch_exceptions=False)
 
     logging_config.assert_called_with(level=logging.INFO)
 
-    expected_arguments['debug'] = False
-    mock_app_run.assert_called_with('firetail.cli', **expected_arguments)
+    expected_arguments["debug"] = False
+    mock_app_run.assert_called_with("firetail.cli", **expected_arguments)
 
 
-def test_run_using_option_base_path(mock_app_run, expected_arguments,
-                                    spec_file):
+def test_run_using_option_base_path(mock_app_run, expected_arguments, spec_file):
     runner = CliRunner()
-    runner.invoke(main, ['run', spec_file, '--base-path', '/foo'],
-                  catch_exceptions=False)
+    runner.invoke(main, ["run", spec_file, "--base-path", "/foo"], catch_exceptions=False)
 
-    expected_arguments = dict(base_path='/foo',
-                              resolver_error=None,
-                              validate_responses=False,
-                              strict_validation=False)
+    expected_arguments = dict(base_path="/foo", resolver_error=None, validate_responses=False, strict_validation=False)
     mock_app_run().add_api.assert_called_with(spec_file, **expected_arguments)
 
 
 def test_run_unimplemented_operations_and_stub(mock_app_run):
     runner = CliRunner()
 
-    spec_file = str(FIXTURES_FOLDER / 'missing_implementation/swagger.yaml')
+    spec_file = str(FIXTURES_FOLDER / "missing_implementation/swagger.yaml")
     with pytest.raises(AttributeError):
-        runner.invoke(main, ['run', spec_file], catch_exceptions=False)
+        runner.invoke(main, ["run", spec_file], catch_exceptions=False)
     # yet can be run with --stub option
-    result = runner.invoke(main, ['run', spec_file, '--stub'], catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "--stub"], catch_exceptions=False)
     assert result.exit_code == 0
 
-    spec_file = str(FIXTURES_FOLDER / 'module_does_not_exist/swagger.yaml')
+    spec_file = str(FIXTURES_FOLDER / "module_does_not_exist/swagger.yaml")
     with pytest.raises(ImportError):
-        runner.invoke(main, ['run', spec_file], catch_exceptions=False)
+        runner.invoke(main, ["run", spec_file], catch_exceptions=False)
     # yet can be run with --stub option
-    result = runner.invoke(main, ['run', spec_file, '--stub'], catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "--stub"], catch_exceptions=False)
     assert result.exit_code == 0
 
 
 def test_run_unimplemented_operations_and_mock(mock_app_run):
     runner = CliRunner()
 
-    spec_file = str(FIXTURES_FOLDER / 'missing_implementation/swagger.yaml')
+    spec_file = str(FIXTURES_FOLDER / "missing_implementation/swagger.yaml")
     with pytest.raises(AttributeError):
-        runner.invoke(main, ['run', spec_file], catch_exceptions=False)
+        runner.invoke(main, ["run", spec_file], catch_exceptions=False)
     # yet can be run with --mock option
-    result = runner.invoke(main, ['run', spec_file, '--mock=all'], catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "--mock=all"], catch_exceptions=False)
     assert result.exit_code == 0
 
 
@@ -236,51 +204,40 @@ def test_run_with_wsgi_containers(mock_app_run, spec_file):
     runner = CliRunner()
 
     # missing gevent
-    result = runner.invoke(main,
-                           ['run', spec_file, '-w', 'gevent'],
-                           catch_exceptions=False)
-    assert 'gevent library is not installed' in result.output
+    result = runner.invoke(main, ["run", spec_file, "-w", "gevent"], catch_exceptions=False)
+    assert "gevent library is not installed" in result.output
     assert result.exit_code == 1
 
     # missing tornado
-    result = runner.invoke(main,
-                           ['run', spec_file, '-w', 'tornado'],
-                           catch_exceptions=False)
-    assert 'tornado library is not installed' in result.output
+    result = runner.invoke(main, ["run", spec_file, "-w", "tornado"], catch_exceptions=False)
+    assert "tornado library is not installed" in result.output
     assert result.exit_code == 1
 
     # using flask
-    result = runner.invoke(main,
-                           ['run', spec_file, '-w', 'flask'],
-                           catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "-w", "flask"], catch_exceptions=False)
     assert result.exit_code == 0
 
 
 def test_run_with_aiohttp_not_installed(mock_app_run, spec_file):
     import sys
-    aiohttp_bkp = sys.modules.pop('aiohttp', None)
-    sys.modules['aiohttp'] = None
+
+    aiohttp_bkp = sys.modules.pop("aiohttp", None)
+    sys.modules["aiohttp"] = None
 
     runner = CliRunner()
 
     # missing aiohttp
-    result = runner.invoke(main,
-                           ['run', spec_file, '-f', 'aiohttp'],
-                           catch_exceptions=False)
-    sys.modules['aiohttp'] = aiohttp_bkp
+    result = runner.invoke(main, ["run", spec_file, "-f", "aiohttp"], catch_exceptions=False)
+    sys.modules["aiohttp"] = aiohttp_bkp
 
-    assert 'aiohttp library is not installed' in result.output
+    assert "aiohttp library is not installed" in result.output
     assert result.exit_code == 1
 
 
 def test_run_with_wsgi_server_and_server_opts(mock_app_run, spec_file):
     runner = CliRunner()
 
-    result = runner.invoke(main,
-                           ['run', spec_file,
-                            '-w', 'flask',
-                            '-s', 'flask'],
-                           catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "-w", "flask", "-s", "flask"], catch_exceptions=False)
     assert "these options are mutually exclusive" in result.output
     assert result.exit_code == 2
 
@@ -288,10 +245,7 @@ def test_run_with_wsgi_server_and_server_opts(mock_app_run, spec_file):
 def test_run_with_incompatible_server_and_default_framework(mock_app_run, spec_file):
     runner = CliRunner()
 
-    result = runner.invoke(main,
-                           ['run', spec_file,
-                           '-s', 'aiohttp'],
-                           catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "-s", "aiohttp"], catch_exceptions=False)
     assert "Invalid server 'aiohttp' for app-framework 'flask'" in result.output
     assert result.exit_code == 2
 
@@ -299,10 +253,6 @@ def test_run_with_incompatible_server_and_default_framework(mock_app_run, spec_f
 def test_run_with_incompatible_server_and_framework(mock_app_run, spec_file):
     runner = CliRunner()
 
-    result = runner.invoke(main,
-                           ['run', spec_file,
-                           '-s', 'flask',
-                           '-f', 'aiohttp'],
-                           catch_exceptions=False)
+    result = runner.invoke(main, ["run", spec_file, "-s", "flask", "-f", "aiohttp"], catch_exceptions=False)
     assert "Invalid server 'flask' for app-framework 'aiohttp'" in result.output
     assert result.exit_code == 2
diff --git a/tests/test_flask_encoder.py b/tests/test_flask_encoder.py
index 8d307a4..d9e9060 100644
--- a/tests/test_flask_encoder.py
+++ b/tests/test_flask_encoder.py
@@ -21,16 +21,14 @@ def test_json_encoder():
     assert s.endswith('Z"')
 
     s = json.dumps(Decimal(1.01), cls=FlaskJSONEncoder)
-    assert s == '1.01'
+    assert s == "1.01"
 
     s = json.dumps(math.expm1(1e-10), cls=FlaskJSONEncoder)
-    assert s == '1.00000000005e-10'
+    assert s == "1.00000000005e-10"
 
 
 def test_json_encoder_datetime_with_timezone():
-
     class DummyTimezone(datetime.tzinfo):
-
         def utcoffset(self, dt):
             return datetime.timedelta(0)
 
@@ -46,42 +44,39 @@ def test_readonly(json_datetime_dir, spec):
     app = build_app_from_fixture(json_datetime_dir, spec, validate_responses=True)
     app_client = app.app.test_client()
 
-    res = app_client.get('/v1.0/' + spec.replace('yaml', 'json'))
+    res = app_client.get("/v1.0/" + spec.replace("yaml", "json"))
     assert res.status_code == 200, f"Error is {res.data}"
     spec_data = json.loads(res.data.decode())
 
-    if spec == 'openapi.yaml':
-        response_path = 'responses.200.content.application/json.schema'
+    if spec == "openapi.yaml":
+        response_path = "responses.200.content.application/json.schema"
     else:
-        response_path = 'responses.200.schema'
+        response_path = "responses.200.schema"
 
     def get_value(data, path):
-        for part in path.split('.'):
+        for part in path.split("."):
             data = data.get(part)
             assert data, f"No data in part '{part}' of '{path}'"
         return data
 
-    example = get_value(spec_data, f'paths./datetime.get.{response_path}.example.value')
-    assert example in [
-        '2000-01-23T04:56:07.000008+00:00',  # PyYAML 5.3+
-        '2000-01-23T04:56:07.000008Z'
-    ]
-    example = get_value(spec_data, f'paths./date.get.{response_path}.example.value')
-    assert example == '2000-01-23'
-    example = get_value(spec_data, f'paths./uuid.get.{response_path}.example.value')
-    assert example == 'a7b8869c-5f24-4ce0-a5d1-3e44c3663aa9'
-
-    res = app_client.get('/v1.0/datetime')
+    example = get_value(spec_data, f"paths./datetime.get.{response_path}.example.value")
+    assert example in ["2000-01-23T04:56:07.000008+00:00", "2000-01-23T04:56:07.000008Z"]  # PyYAML 5.3+
+    example = get_value(spec_data, f"paths./date.get.{response_path}.example.value")
+    assert example == "2000-01-23"
+    example = get_value(spec_data, f"paths./uuid.get.{response_path}.example.value")
+    assert example == "a7b8869c-5f24-4ce0-a5d1-3e44c3663aa9"
+
+    res = app_client.get("/v1.0/datetime")
     assert res.status_code == 200, f"Error is {res.data}"
     data = json.loads(res.data.decode())
-    assert data == {'value': '2000-01-02T03:04:05.000006Z'}
+    assert data == {"value": "2000-01-02T03:04:05.000006Z"}
 
-    res = app_client.get('/v1.0/date')
+    res = app_client.get("/v1.0/date")
     assert res.status_code == 200, f"Error is {res.data}"
     data = json.loads(res.data.decode())
-    assert data == {'value': '2000-01-02'}
+    assert data == {"value": "2000-01-02"}
 
-    res = app_client.get('/v1.0/uuid')
+    res = app_client.get("/v1.0/uuid")
     assert res.status_code == 200, f"Error is {res.data}"
     data = json.loads(res.data.decode())
-    assert data == {'value': 'e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51'}
+    assert data == {"value": "e7ff66d0-3ec2-4c4e-bed0-6e4723c24c51"}
diff --git a/tests/test_flask_utils.py b/tests/test_flask_utils.py
index 4251306..d5fc25b 100644
--- a/tests/test_flask_utils.py
+++ b/tests/test_flask_utils.py
@@ -6,18 +6,18 @@ def test_flaskify_path():
     assert flask_utils.flaskify_path("api/{test-path}") == "api/<test_path>"
     assert flask_utils.flaskify_path("my-api/{test-path}") == "my-api/<test_path>"
     assert flask_utils.flaskify_path("foo_bar/{a-b}/{c_d}") == "foo_bar/<a_b>/<c_d>"
-    assert flask_utils.flaskify_path("foo/{a}/{b}", {'a': 'integer'}) == "foo/<int:a>/<b>"
-    assert flask_utils.flaskify_path("foo/{a}/{b}", {'a': 'number'}) == "foo/<float:a>/<b>"
-    assert flask_utils.flaskify_path("foo/{a}/{b}", {'a': 'path'}) == "foo/<path:a>/<b>"
-    assert flask_utils.flaskify_path("foo/{a}", {'a': 'path'}) == "foo/<path:a>"
+    assert flask_utils.flaskify_path("foo/{a}/{b}", {"a": "integer"}) == "foo/<int:a>/<b>"
+    assert flask_utils.flaskify_path("foo/{a}/{b}", {"a": "number"}) == "foo/<float:a>/<b>"
+    assert flask_utils.flaskify_path("foo/{a}/{b}", {"a": "path"}) == "foo/<path:a>/<b>"
+    assert flask_utils.flaskify_path("foo/{a}", {"a": "path"}) == "foo/<path:a>"
 
 
 def test_flaskify_endpoint():
     assert flask_utils.flaskify_endpoint("module.function") == "module_function"
     assert flask_utils.flaskify_endpoint("function") == "function"
 
-    name = 'module.function'
+    name = "module.function"
     randlen = 6
     res = flask_utils.flaskify_endpoint(name, randlen)
-    assert res.startswith('module_function')
+    assert res.startswith("module_function")
     assert len(res) == len(name) + 1 + randlen
diff --git a/tests/test_json_validation.py b/tests/test_json_validation.py
index ff42154..2da7012 100644
--- a/tests/test_json_validation.py
+++ b/tests/test_json_validation.py
@@ -16,29 +16,33 @@
 def test_validator_map(json_validation_spec_dir, spec):
     def validate_type(validator, types, instance, schema):
         types = _utils.ensure_list(types)
-        errors = Draft4RequestValidator.VALIDATORS['type'](validator, types, instance, schema)
+        errors = Draft4RequestValidator.VALIDATORS["type"](validator, types, instance, schema)
         yield from errors
 
-        if 'string' in types and 'minLength' not in schema:
-            errors = Draft4RequestValidator.VALIDATORS['minLength'](validator, 1, instance, schema)
+        if "string" in types and "minLength" not in schema:
+            errors = Draft4RequestValidator.VALIDATORS["minLength"](validator, 1, instance, schema)
             yield from errors
 
-    MinLengthRequestValidator = extend(Draft4RequestValidator, {'type': validate_type})
+    MinLengthRequestValidator = extend(Draft4RequestValidator, {"type": validate_type})
 
     class MyRequestBodyValidator(RequestBodyValidator):
         def __init__(self, *args, **kwargs):
             super().__init__(*args, validator=MinLengthRequestValidator, **kwargs)
 
-    validator_map = {'body': MyRequestBodyValidator}
+    validator_map = {"body": MyRequestBodyValidator}
 
     app = App(__name__, specification_dir=json_validation_spec_dir)
     app.add_api(spec, validate_responses=True, validator_map=validator_map)
     app_client = app.app.test_client()
 
-    res = app_client.post('/v1.0/minlength', data=json.dumps({'foo': 'bar'}), content_type='application/json') # type: flask.Response
+    res = app_client.post(
+        "/v1.0/minlength", data=json.dumps({"foo": "bar"}), content_type="application/json"
+    )  # type: flask.Response
     assert res.status_code == 200
 
-    res = app_client.post('/v1.0/minlength', data=json.dumps({'foo': ''}), content_type='application/json') # type: flask.Response
+    res = app_client.post(
+        "/v1.0/minlength", data=json.dumps({"foo": ""}), content_type="application/json"
+    )  # type: flask.Response
     assert res.status_code == 400
 
 
@@ -47,15 +51,19 @@ def test_readonly(json_validation_spec_dir, spec):
     app = build_app_from_fixture(json_validation_spec_dir, spec, validate_responses=True)
     app_client = app.app.test_client()
 
-    res = app_client.get('/v1.0/user') # type: flask.Response
+    res = app_client.get("/v1.0/user")  # type: flask.Response
     assert res.status_code == 200
-    assert json.loads(res.data.decode()).get('user_id') == 7
+    assert json.loads(res.data.decode()).get("user_id") == 7
 
-    res = app_client.post('/v1.0/user', data=json.dumps({'name': 'max', 'password': '1234'}), content_type='application/json') # type: flask.Response
+    res = app_client.post(
+        "/v1.0/user", data=json.dumps({"name": "max", "password": "1234"}), content_type="application/json"
+    )  # type: flask.Response
     assert res.status_code == 200
-    assert json.loads(res.data.decode()).get('user_id') == 8
+    assert json.loads(res.data.decode()).get("user_id") == 8
 
-    res = app_client.post('/v1.0/user', data=json.dumps({'user_id': 9, 'name': 'max'}), content_type='application/json') # type: flask.Response
+    res = app_client.post(
+        "/v1.0/user", data=json.dumps({"user_id": 9, "name": "max"}), content_type="application/json"
+    )  # type: flask.Response
     assert res.status_code == 400
 
 
@@ -64,17 +72,19 @@ def test_writeonly(json_validation_spec_dir, spec):
     app = build_app_from_fixture(json_validation_spec_dir, spec, validate_responses=True)
     app_client = app.app.test_client()
 
-    res = app_client.post('/v1.0/user', data=json.dumps({'name': 'max', 'password': '1234'}), content_type='application/json') # type: flask.Response
+    res = app_client.post(
+        "/v1.0/user", data=json.dumps({"name": "max", "password": "1234"}), content_type="application/json"
+    )  # type: flask.Response
     assert res.status_code == 200
-    assert 'password' not in json.loads(res.data.decode())
+    assert "password" not in json.loads(res.data.decode())
 
-    res = app_client.get('/v1.0/user') # type: flask.Response
+    res = app_client.get("/v1.0/user")  # type: flask.Response
     assert res.status_code == 200
-    assert 'password' not in json.loads(res.data.decode())
+    assert "password" not in json.loads(res.data.decode())
 
-    res = app_client.get('/v1.0/user_with_password') # type: flask.Response
+    res = app_client.get("/v1.0/user_with_password")  # type: flask.Response
     assert res.status_code == 500
-    assert json.loads(res.data.decode())['title'] == 'Response body does not conform to specification'
+    assert json.loads(res.data.decode())["title"] == "Response body does not conform to specification"
 
 
 @pytest.mark.parametrize("spec", SPECS)
@@ -88,7 +98,11 @@ def test_multipart_form_json(json_validation_spec_dir, spec):
     app = build_app_from_fixture(json_validation_spec_dir, spec, validate_responses=True)
     app_client = app.app.test_client()
 
-    res = app_client.post('/v1.0/multipart_form_json', data={'x': json.dumps({"name": "joe", "age": 20})}, content_type='multipart/form-data')
+    res = app_client.post(
+        "/v1.0/multipart_form_json",
+        data={"x": json.dumps({"name": "joe", "age": 20})},
+        content_type="multipart/form-data",
+    )
     assert res.status_code == 200
-    assert json.loads(res.data.decode())['name'] == "joe-reply"
-    assert json.loads(res.data.decode())['age'] == 30
+    assert json.loads(res.data.decode())["name"] == "joe-reply"
+    assert json.loads(res.data.decode())["age"] == 30
diff --git a/tests/test_metrics.py b/tests/test_metrics.py
index be45a13..73e4afc 100644
--- a/tests/test_metrics.py
+++ b/tests/test_metrics.py
@@ -7,17 +7,16 @@
 
 
 def test_timer(monkeypatch):
-    wrapper = UWSGIMetricsCollector('/foo/bar/<param>', 'get')
+    wrapper = UWSGIMetricsCollector("/foo/bar/<param>", "get")
 
     def operation(req):
-        raise ProblemException(418, '', '')
+        raise ProblemException(418, "", "")
 
     op = wrapper(operation)
     metrics = MagicMock()
-    monkeypatch.setattr('flask.request', MagicMock())
-    monkeypatch.setattr('flask.current_app', MagicMock(response_class=flask.Response))
-    monkeypatch.setattr('firetail.decorators.metrics.uwsgi_metrics', metrics)
+    monkeypatch.setattr("flask.request", MagicMock())
+    monkeypatch.setattr("flask.current_app", MagicMock(response_class=flask.Response))
+    monkeypatch.setattr("firetail.decorators.metrics.uwsgi_metrics", metrics)
     with pytest.raises(ProblemException) as exc:
         op(MagicMock())
-    assert metrics.timer.call_args[0][:2] == ('firetail.response',
-                                              '418.GET.foo.bar.{param}')
+    assert metrics.timer.call_args[0][:2] == ("firetail.response", "418.GET.foo.bar.{param}")
diff --git a/tests/test_mock.py b/tests/test_mock.py
index a546bb6..2037e06 100644
--- a/tests/test_mock.py
+++ b/tests/test_mock.py
@@ -5,387 +5,339 @@
 def test_mock_resolver_default():
     resolver = MockResolver(mock_all=True)
 
-    responses = {
-        'default': {
-            'examples': {
-                'application/json': {
-                    'foo': 'bar'
-                }
-            }
-        }
-    }
-
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    responses = {"default": {"examples": {"application/json": {"foo": "bar"}}}}
+
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_numeric():
     resolver = MockResolver(mock_all=True)
 
-    responses = {
-        '200': {
-            'examples': {
-                'application/json': {
-                    'foo': 'bar'
-                }
-            }
-        }
-    }
-
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    responses = {"200": {"examples": {"application/json": {"foo": "bar"}}}}
+
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_example():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'schema': {
-                'type': 'object',
-                'properties': {
-                    'foo': {
-                        'type': 'string'
-                    }
-                },
-                'example': {
-                    'foo': 'bar'
-                }
-            }
-        }
+        "default": {"schema": {"type": "object", "properties": {"foo": {"type": "string"}}, "example": {"foo": "bar"}}}
     }
 
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_example_nested_in_object():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'schema': {
-                'type': 'object',
-                'properties': {
-                    'foo': {
-                        'type': 'string',
-                        'example': 'bar'
-                    }
-                },
+        "default": {
+            "schema": {
+                "type": "object",
+                "properties": {"foo": {"type": "string", "example": "bar"}},
             }
         }
     }
 
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_example_nested_in_list():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'schema': {
-                'type': 'array',
-                'items': {
-                    'type': 'string',
-                    'example': 'bar'
-                },
+        "default": {
+            "schema": {
+                "type": "array",
+                "items": {"type": "string", "example": "bar"},
             }
         }
     }
 
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == ['bar']
+    assert response == ["bar"]
+
 
 def test_mock_resolver_example_nested_in_object_openapi():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'content': {
-                'application/json': {
-                    'schema': {
-                        'type': 'object',
-                        'properties': {
-                            'foo': {
-                                'type': 'string',
-                                'example': 'bar'
-                            }
-                        }
-                    }
+        "default": {
+            "content": {
+                "application/json": {
+                    "schema": {"type": "object", "properties": {"foo": {"type": "string", "example": "bar"}}}
                 }
             }
         }
     }
 
-    operation = OpenAPIOperation(api=None,
-                                 method='GET',
-                                 path='endpoint',
-                                 path_parameters=[],
-                                 operation={
-                                     'responses': responses
-                                 },
-                                 app_security=[],
-                                 resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = OpenAPIOperation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_security=[],
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_example_nested_in_list_openapi():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'content': {
-                'application/json': {
-                    'schema': {
-                        'type': 'array',
-                        'items': {
-                            'type': 'string',
-                            'example': 'bar'
-                        }
-                    }
-                }
+        "default": {
+            "content": {
+                "application/json": {"schema": {"type": "array", "items": {"type": "string", "example": "bar"}}}
             }
         }
     }
 
-    operation = OpenAPIOperation(api=None,
-                                 method='GET',
-                                 path='endpoint',
-                                 path_parameters=[],
-                                 operation={
-                                     'responses': responses
-                                 },
-                                 app_security=[],
-                                 resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = OpenAPIOperation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_security=[],
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == ['bar']
+    assert response == ["bar"]
+
 
 def test_mock_resolver_no_example_nested_in_object():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        '200': {
-            'schema': {
-                'type': 'object',
-                'properties': {
-                    'foo': {
-                        'type': 'string',
+        "200": {
+            "schema": {
+                "type": "object",
+                "properties": {
+                    "foo": {
+                        "type": "string",
                     }
                 },
             }
         }
     }
 
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == 'No example response was defined.'
+    assert response == "No example response was defined."
+
 
 def test_mock_resolver_no_example_nested_in_list_openapi():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        '202': {
-            'content': {
-                'application/json': {
-                    'schema': {
-                        'type': 'array',
-                        'items': {
-                            'type': 'string',
-                        }
+        "202": {
+            "content": {
+                "application/json": {
+                    "schema": {
+                        "type": "array",
+                        "items": {
+                            "type": "string",
+                        },
                     }
                 }
             }
         }
     }
 
-    operation = OpenAPIOperation(api=None,
-                                 method='GET',
-                                 path='endpoint',
-                                 path_parameters=[],
-                                 operation={
-                                     'responses': responses
-                                 },
-                                 app_security=[],
-                                 resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    operation = OpenAPIOperation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_security=[],
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 202
-    assert response == 'No example response was defined.'
+    assert response == "No example response was defined."
+
 
 def test_mock_resolver_no_examples():
     resolver = MockResolver(mock_all=True)
 
-    responses = {
-        '418': {}
-    }
-
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'mock-1'
+    responses = {"418": {}}
+
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 418
-    assert response == 'No example response was defined.'
+    assert response == "No example response was defined."
 
 
 def test_mock_resolver_notimplemented():
     resolver = MockResolver(mock_all=False)
 
-    responses = {
-        '418': {}
-    }
+    responses = {"418": {}}
 
     # do not mock the existent functions
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'operationId': 'fakeapi.hello.get'
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
-    assert operation.operation_id == 'fakeapi.hello.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"operationId": "fakeapi.hello.get"},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
+    assert operation.operation_id == "fakeapi.hello.get"
 
     # mock only the nonexistent ones
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'operationId': 'fakeapi.hello.nonexistent_function',
-                                      'responses': responses
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions={},
-                                  resolver=resolver)
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={"operationId": "fakeapi.hello.nonexistent_function", "responses": responses},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions={},
+        resolver=resolver,
+    )
 
     # check if it is using the mock function
-    assert operation._resolution.function() == ('No example response was defined.', 418)
+    assert operation._resolution.function() == ("No example response was defined.", 418)
diff --git a/tests/test_mock3.py b/tests/test_mock3.py
index 72b9642..6cbea12 100644
--- a/tests/test_mock3.py
+++ b/tests/test_mock3.py
@@ -6,96 +6,57 @@ def test_mock_resolver_default():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'content': {
-                'application/json': {
-                    'examples': {
-                        "super_cool_example": {
-                            "value": {
-                                'foo': 'bar'
-                            }
-                        }
-                    }
-                }
-            }
-        }
+        "default": {"content": {"application/json": {"examples": {"super_cool_example": {"value": {"foo": "bar"}}}}}}
     }
 
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'responses': responses
-        },
+        operation={"responses": responses},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
-    assert operation.operation_id == 'mock-1'
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
 
 
 def test_mock_resolver_numeric():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        '200': {
-            'content': {
-                'application/json': {
-                    'examples': {
-                        "super_cool_example": {
-                            "value": {
-                                'foo': 'bar'
-                            }
-                        }
-                    }
-                }
-            }
-        }
+        "200": {"content": {"application/json": {"examples": {"super_cool_example": {"value": {"foo": "bar"}}}}}}
     }
 
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'responses': responses
-        },
+        operation={"responses": responses},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
-    assert operation.operation_id == 'mock-1'
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
 
 
 def test_mock_resolver_inline_schema_example():
     resolver = MockResolver(mock_all=True)
 
     responses = {
-        'default': {
-            'content': {
-                'application/json': {
-                    'schema': {
-                        'type': 'object',
-                        'properties': {
-                            'foo': {
-                                'schema': {
-                                    'type': 'string'
-                                }
-                            }
-                        }
-                    },
-                    'example': {
-                        'foo': 'bar'
-                    }
+        "default": {
+            "content": {
+                "application/json": {
+                    "schema": {"type": "object", "properties": {"foo": {"schema": {"type": "string"}}}},
+                    "example": {"foo": "bar"},
                 }
             }
         }
@@ -103,78 +64,67 @@ def test_mock_resolver_inline_schema_example():
 
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'responses': responses
-        },
+        operation={"responses": responses},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
-    assert operation.operation_id == 'mock-1'
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 200
-    assert response == {'foo': 'bar'}
+    assert response == {"foo": "bar"}
+
 
 def test_mock_resolver_no_examples():
     resolver = MockResolver(mock_all=True)
 
-    responses = {
-        '418': {}
-    }
+    responses = {"418": {}}
 
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'responses': responses
-        },
+        operation={"responses": responses},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
-    assert operation.operation_id == 'mock-1'
+    assert operation.operation_id == "mock-1"
 
     response, status_code = resolver.mock_operation(operation)
     assert status_code == 418
-    assert response == 'No example response was defined.'
+    assert response == "No example response was defined."
+
 
 def test_mock_resolver_notimplemented():
     resolver = MockResolver(mock_all=False)
 
-    responses = {
-        '418': {}
-    }
+    responses = {"418": {}}
 
     # do not mock the existent functions
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'operationId': 'fakeapi.hello.get'
-        },
+        operation={"operationId": "fakeapi.hello.get"},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
-    assert operation.operation_id == 'fakeapi.hello.get'
+    assert operation.operation_id == "fakeapi.hello.get"
 
     # mock only the nonexistent ones
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
-        operation={
-            'operationId': 'fakeapi.hello.nonexistent_function',
-            'responses': responses
-        },
+        operation={"operationId": "fakeapi.hello.nonexistent_function", "responses": responses},
         app_security=[],
-        resolver=resolver
+        resolver=resolver,
     )
     # check if it is using the mock function
-    assert operation._resolution.function() == ('No example response was defined.', 418)
+    assert operation._resolution.function() == ("No example response was defined.", 418)
diff --git a/tests/test_operation2.py b/tests/test_operation2.py
index fc89a03..3bc11e4 100644
--- a/tests/test_operation2.py
+++ b/tests/test_operation2.py
@@ -14,250 +14,296 @@
 
 TEST_FOLDER = pathlib.Path(__file__).parent
 
-DEFINITIONS = {'new_stack': {'required': ['image_version', 'keep_stacks', 'new_traffic', 'senza_yaml'],
-                             'type': 'object',
-                             'properties': {'keep_stacks': {'type': 'integer',
-                                                            'description':
-                                                            'Number of older stacks to keep'},
-                                            'image_version': {'type': 'string',
-                                                              'description':
-                                                              'Docker image version to deploy'},
-                                            'senza_yaml': {'type': 'string',
-                                                           'description': 'YAML to provide to senza'},
-                                            'new_traffic': {'type': 'integer',
-                                                            'description':
-                                                            'Percentage of the traffic'}}},
-               'composed': {'required': ['test'],
-                            'type': 'object',
-                            'properties': {'test': {'schema': {'$ref': '#/definitions/new_stack'}}}},
-               'problem': {"not": "defined"}}
-PARAMETER_DEFINITIONS = {'myparam': {'in': 'path', 'type': 'integer'}}
-
-OPERATION1 = {'description': 'Adds a new stack to be created by lizzy and returns the '
-              'information needed to keep track of deployment',
-              'operationId': 'fakeapi.hello.post_greeting',
-              'parameters': [{'in': 'body',
-                              'name': 'new_stack',
-                              'required': True,
-                              'schema': {'$ref': '#/definitions/new_stack'}}],
-              'responses': {201: {'description': 'Stack to be created. The '
-                                  'CloudFormation Stack creation can '
-                                  "still fail if it's rejected by senza "
-                                  'or AWS CF.',
-                                  'schema': {'$ref': '#/definitions/new_stack'}},
-                            400: {'description': 'Stack was not created because request '
-                                  'was invalid',
-                                  'schema': {'$ref': '#/definitions/problem'}},
-                            401: {'description': 'Stack was not created because the '
-                                  'access token was not provided or was '
-                                  'not valid for this operation',
-                                  'schema': {'$ref': '#/definitions/problem'}}},
-              'security': [{'oauth': ['uid']}],
-              'summary': 'Create new stack'}
-
-OPERATION2 = {'description': 'Adds a new stack to be created by lizzy and returns the '
-              'information needed to keep track of deployment',
-              'operationId': 'fakeapi.hello.post_greeting',
-              'parameters': [{'in': 'body',
-                              'name': 'new_stack',
-                              'required': True,
-                              'schema': {'$ref': '#/definitions/new_stack'}},
-                             {'in': 'body',
-                              'name': 'new_stack',
-                              'required': True,
-                              'schema': {'$ref': '#/definitions/new_stack'}}],
-              'responses': {201: {'description': 'Stack to be created. The '
-                                  'CloudFormation Stack creation can '
-                                  "still fail if it's rejected by senza "
-                                  'or AWS CF.',
-                                  'schema': {'$ref': '#/definitions/new_stack'}},
-                            400: {'description': 'Stack was not created because request '
-                                  'was invalid',
-                                  'schema': {'$ref': '#/definitions/problem'}},
-                            401: {'description': 'Stack was not created because the '
-                                  'access token was not provided or was '
-                                  'not valid for this operation',
-                                  'schema': {'$ref': '#/definitions/problem'}}},
-              'security': [{'oauth': ['uid']}],
-              'summary': 'Create new stack'}
-
-OPERATION3 = {'operationId': 'fakeapi.hello.post_greeting',
-              'parameters': [{'$ref': '#/parameters/myparam'}]}
-
-OPERATION4 = {'description': 'Adds a new stack to be created by lizzy and returns the '
-              'information needed to keep track of deployment',
-              'operationId': 'fakeapi.hello.post_greeting',
-              'parameters': [
-                  {
-                      'in': 'body',
-                      'name': 'new_stack',
-                      'required': True,
-                      'schema': {'$ref': '#/definitions/new_stack'}
-                  },
-                  {
-                      'in': 'query',
-                      'name': 'stack_version',
-                      'default': 'one',
-                      'type': 'number'
-                  }
-              ],
-              'responses': {201: {'description': 'Stack to be created. The '
-                                  'CloudFormation Stack creation can '
-                                  "still fail if it's rejected by senza "
-                                  'or AWS CF.',
-                                  'schema': {'$ref': '#/definitions/new_stack'}},
-                            400: {'description': 'Stack was not created because request '
-                                  'was invalid',
-                                  'schema': {'$ref': '#/definitions/problem'}},
-                            401: {'description': 'Stack was not created because the '
-                                  'access token was not provided or was '
-                                  'not valid for this operation',
-                                  'schema': {'$ref': '#/definitions/problem'}}},
-              'summary': 'Create new stack'}
+DEFINITIONS = {
+    "new_stack": {
+        "required": ["image_version", "keep_stacks", "new_traffic", "senza_yaml"],
+        "type": "object",
+        "properties": {
+            "keep_stacks": {"type": "integer", "description": "Number of older stacks to keep"},
+            "image_version": {"type": "string", "description": "Docker image version to deploy"},
+            "senza_yaml": {"type": "string", "description": "YAML to provide to senza"},
+            "new_traffic": {"type": "integer", "description": "Percentage of the traffic"},
+        },
+    },
+    "composed": {
+        "required": ["test"],
+        "type": "object",
+        "properties": {"test": {"schema": {"$ref": "#/definitions/new_stack"}}},
+    },
+    "problem": {"not": "defined"},
+}
+PARAMETER_DEFINITIONS = {"myparam": {"in": "path", "type": "integer"}}
+
+OPERATION1 = {
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [
+        {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/definitions/new_stack"}}
+    ],
+    "responses": {
+        201: {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        400: {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        401: {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
+}
+
+OPERATION2 = {
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [
+        {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/definitions/new_stack"}},
+        {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/definitions/new_stack"}},
+    ],
+    "responses": {
+        201: {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        400: {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        401: {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
+}
+
+OPERATION3 = {"operationId": "fakeapi.hello.post_greeting", "parameters": [{"$ref": "#/parameters/myparam"}]}
+
+OPERATION4 = {
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [
+        {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/definitions/new_stack"}},
+        {"in": "query", "name": "stack_version", "default": "one", "type": "number"},
+    ],
+    "responses": {
+        201: {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        400: {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        401: {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "summary": "Create new stack",
+}
 
 OPERATION5 = {
-    'description': 'Adds a new stack to be created by lizzy and returns the '
-    'information needed to keep track of deployment',
-    'operationId': 'fakeapi.hello.post_greeting',
-    'parameters': [
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [{"in": "body", "name": "new_stack", "required": True, "type": "integer", "default": "stack"}],
+    "responses": {
+        "201": {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        "400": {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        "401": {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
+}
+
+OPERATION6 = {
+    "operationId": "fakeapi.hello.schema",
+    "parameters": [
         {
-            'in': 'body',
-            'name': 'new_stack',
-            'required': True,
-            'type': 'integer',
-            'default': 'stack'
+            "type": "object",
+            "in": "body",
+            "name": "new_stack",
+            "default": {"keep_stack": 1, "image_version": 1, "senza_yaml": "senza.yaml", "new_traffic": 100},
+            "schema": {"$ref": "#/definitions/new_stack"},
         }
     ],
-    'responses': {'201': {'description': 'Stack to be created. The '
-                          'CloudFormation Stack creation can '
-                          "still fail if it's rejected by senza "
-                          'or AWS CF.',
-                          'schema': {'$ref': '#/definitions/new_stack'}},
-                  '400': {'description': 'Stack was not created because request '
-                          'was invalid',
-                          'schema': {'$ref': '#/definitions/problem'}},
-                  '401': {'description': 'Stack was not created because the '
-                          'access token was not provided or was '
-                          'not valid for this operation',
-                          'schema': {'$ref': '#/definitions/problem'}}},
-    'security': [{'oauth': ['uid']}],
-    'summary': 'Create new stack'
+    "responses": {},
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
 }
 
-OPERATION6 = {
-    'operationId': 'fakeapi.hello.schema',
-    'parameters': [
+OPERATION7 = {
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [
         {
-            'type': 'object',
-            'in': 'body',
-            'name': 'new_stack',
-            'default': {'keep_stack': 1, 'image_version': 1, 'senza_yaml': 'senza.yaml',
-                        'new_traffic': 100},
-            'schema': {'$ref': '#/definitions/new_stack'}
+            "in": "body",
+            "name": "new_stack",
+            "required": True,
+            "schema": {"type": "array", "items": {"$ref": "#/definitions/new_stack"}},
         }
     ],
-    'responses': {},
-    'security': [{'oauth': ['uid']}],
-    'summary': 'Create new stack'
+    "responses": {
+        "201": {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        "400": {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        "401": {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
+}
+
+OPERATION8 = {
+    "description": "Adds a new stack to be created by lizzy and returns the "
+    "information needed to keep track of deployment",
+    "operationId": "fakeapi.hello.post_greeting",
+    "parameters": [{"in": "body", "name": "test", "required": True, "schema": {"$ref": "#/definitions/composed"}}],
+    "responses": {
+        "201": {
+            "description": "Stack to be created. The "
+            "CloudFormation Stack creation can "
+            "still fail if it's rejected by senza "
+            "or AWS CF.",
+            "schema": {"$ref": "#/definitions/new_stack"},
+        },
+        "400": {
+            "description": "Stack was not created because request " "was invalid",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+        "401": {
+            "description": "Stack was not created because the "
+            "access token was not provided or was "
+            "not valid for this operation",
+            "schema": {"$ref": "#/definitions/problem"},
+        },
+    },
+    "security": [{"oauth": ["uid"]}],
+    "summary": "Create new stack",
+}
+
+OPERATION9 = {
+    "description": "operation secured with 2 api keys",
+    "operationId": "fakeapi.hello.post_greeting",
+    "responses": {"200": {"description": "OK"}},
+    "security": [{"key1": [], "key2": []}],
+}
+
+OPERATION10 = {
+    "description": "operation secured with 2 oauth schemes combined using logical AND",
+    "operationId": "fakeapi.hello.post_greeting",
+    "responses": {"200": {"description": "OK"}},
+    "security": [{"oauth_1": ["uid"], "oauth_2": ["uid"]}],
+}
+
+OPERATION11 = {
+    "description": "operation secured with an oauth schemes with 2 possible scopes (in OR)",
+    "operationId": "fakeapi.hello.post_greeting",
+    "responses": {"200": {"description": "OK"}},
+    "security": [{"oauth": ["myscope"]}, {"oauth": ["myscope2"]}],
+}
+
+SECURITY_DEFINITIONS_REMOTE = {
+    "oauth": {
+        "type": "oauth2",
+        "flow": "password",
+        "x-tokenInfoUrl": "https://oauth.example/token_info",
+        "scopes": {"myscope": "can do stuff"},
+    }
+}
+
+SECURITY_DEFINITIONS_LOCAL = {
+    "oauth": {
+        "type": "oauth2",
+        "flow": "password",
+        "x-tokenInfoFunc": "math.ceil",
+        "scopes": {"myscope": "can do stuff", "myscope2": "can do other stuff"},
+    }
+}
+
+SECURITY_DEFINITIONS_BOTH = {
+    "oauth": {
+        "type": "oauth2",
+        "flow": "password",
+        "x-tokenInfoFunc": "math.ceil",
+        "x-tokenInfoUrl": "https://oauth.example/token_info",
+        "scopes": {"myscope": "can do stuff"},
+    }
+}
+
+SECURITY_DEFINITIONS_WO_INFO = {"oauth": {"type": "oauth2", "flow": "password", "scopes": {"myscope": "can do stuff"}}}
+
+SECURITY_DEFINITIONS_2_KEYS = {
+    "key1": {"type": "apiKey", "in": "header", "name": "X-Auth-1", "x-apikeyInfoFunc": "math.ceil"},
+    "key2": {"type": "apiKey", "in": "header", "name": "X-Auth-2", "x-apikeyInfoFunc": "math.ceil"},
 }
 
-OPERATION7 = {'description': 'Adds a new stack to be created by lizzy and returns the '
-              'information needed to keep track of deployment',
-              'operationId': 'fakeapi.hello.post_greeting',
-              'parameters': [{'in': 'body',
-                              'name': 'new_stack',
-                              'required': True,
-                              'schema': {'type': 'array', 'items': {'$ref': '#/definitions/new_stack'}}}],
-              'responses': {'201': {'description': 'Stack to be created. The '
-                                    'CloudFormation Stack creation can '
-                                    "still fail if it's rejected by senza "
-                                    'or AWS CF.',
-                                    'schema': {'$ref': '#/definitions/new_stack'}},
-                            '400': {'description': 'Stack was not created because request '
-                                    'was invalid',
-                                    'schema': {'$ref': '#/definitions/problem'}},
-                            '401': {'description': 'Stack was not created because the '
-                                    'access token was not provided or was '
-                                    'not valid for this operation',
-                                    'schema': {'$ref': '#/definitions/problem'}}},
-              'security': [{'oauth': ['uid']}],
-              'summary': 'Create new stack'}
-
-OPERATION8 = {'description': 'Adds a new stack to be created by lizzy and returns the '
-               'information needed to keep track of deployment',
-               'operationId': 'fakeapi.hello.post_greeting',
-               'parameters': [{'in': 'body',
-                               'name': 'test',
-                               'required': True,
-                               'schema': {'$ref': '#/definitions/composed'}}],
-               'responses': {'201': {'description': 'Stack to be created. The '
-                                     'CloudFormation Stack creation can '
-                                     "still fail if it's rejected by senza "
-                                     'or AWS CF.',
-                                     'schema': {'$ref': '#/definitions/new_stack'}},
-                             '400': {'description': 'Stack was not created because request '
-                                     'was invalid',
-                                     'schema': {'$ref': '#/definitions/problem'}},
-                             '401': {'description': 'Stack was not created because the '
-                                     'access token was not provided or was '
-                                     'not valid for this operation',
-                                     'schema': {'$ref': '#/definitions/problem'}}},
-               'security': [{'oauth': ['uid']}],
-               'summary': 'Create new stack'}
-
-OPERATION9 = {'description': 'operation secured with 2 api keys',
-                'operationId': 'fakeapi.hello.post_greeting',
-                'responses': {'200': {'description': 'OK'}},
-                'security': [{'key1': [], 'key2': []}]}
-
-OPERATION10 = {'description': 'operation secured with 2 oauth schemes combined using logical AND',
-                'operationId': 'fakeapi.hello.post_greeting',
-                'responses': {'200': {'description': 'OK'}},
-                'security': [{'oauth_1': ['uid'], 'oauth_2': ['uid']}]}
-
-OPERATION11 = {'description': 'operation secured with an oauth schemes with 2 possible scopes (in OR)',
-                'operationId': 'fakeapi.hello.post_greeting',
-                'responses': {'200': {'description': 'OK'}},
-                'security': [{'oauth': ['myscope']}, {'oauth': ['myscope2']}]}
-
-SECURITY_DEFINITIONS_REMOTE = {'oauth': {'type': 'oauth2',
-                                         'flow': 'password',
-                                         'x-tokenInfoUrl': 'https://oauth.example/token_info',
-                                         'scopes': {'myscope': 'can do stuff'}}}
-
-SECURITY_DEFINITIONS_LOCAL = {'oauth': {'type': 'oauth2',
-                                        'flow': 'password',
-                                        'x-tokenInfoFunc': 'math.ceil',
-                                        'scopes': {'myscope': 'can do stuff',
-                                                   'myscope2': 'can do other stuff'}}}
-
-SECURITY_DEFINITIONS_BOTH = {'oauth': {'type': 'oauth2',
-                                       'flow': 'password',
-                                       'x-tokenInfoFunc': 'math.ceil',
-                                       'x-tokenInfoUrl': 'https://oauth.example/token_info',
-                                       'scopes': {'myscope': 'can do stuff'}}}
-
-SECURITY_DEFINITIONS_WO_INFO = {'oauth': {'type': 'oauth2',
-                                          'flow': 'password',
-                                          'scopes': {'myscope': 'can do stuff'}}}
-
-SECURITY_DEFINITIONS_2_KEYS = {'key1': {'type': 'apiKey',
-                                        'in': 'header',
-                                        'name': 'X-Auth-1',
-                                        'x-apikeyInfoFunc': 'math.ceil'},
-                               'key2': {'type': 'apiKey',
-                                        'in': 'header',
-                                        'name': 'X-Auth-2',
-                                        'x-apikeyInfoFunc': 'math.ceil'}}
-
-SECURITY_DEFINITIONS_2_OAUTH = {'oauth_1': {'type': 'oauth2',
-                                            'flow': 'password',
-                                            'x-tokenInfoFunc': 'math.ceil',
-                                            'scopes': {'myscope': 'can do stuff'}},
-                                'oauth_2': {'type': 'oauth2',
-                                            'flow': 'password',
-                                            'x-tokenInfoFunc': 'math.ceil',
-                                            'scopes': {'myscope': 'can do stuff'}}}
+SECURITY_DEFINITIONS_2_OAUTH = {
+    "oauth_1": {
+        "type": "oauth2",
+        "flow": "password",
+        "x-tokenInfoFunc": "math.ceil",
+        "scopes": {"myscope": "can do stuff"},
+    },
+    "oauth_2": {
+        "type": "oauth2",
+        "flow": "password",
+        "x-tokenInfoFunc": "math.ceil",
+        "scopes": {"myscope": "can do stuff"},
+    },
+}
 
 
 @pytest.fixture
@@ -268,8 +314,8 @@ def api(security_handler_factory):
 
 
 def make_operation(op, definitions=True, parameters=True):
-    """ note the wrapper because definitions namespace and
-        operation namespace collide
+    """note the wrapper because definitions namespace and
+    operation namespace collide
     """
     new_op = {"wrapper": copy.deepcopy(op)}
     if definitions:
@@ -280,174 +326,182 @@ def make_operation(op, definitions=True, parameters=True):
 
 
 def test_operation(api, security_handler_factory):
-    verify_oauth = mock.MagicMock(return_value='verify_oauth_result')
+    verify_oauth = mock.MagicMock(return_value="verify_oauth_result")
     security_handler_factory.verify_oauth = verify_oauth
-    security_handler_factory.get_token_info_remote = mock.MagicMock(return_value='get_token_info_remote_result')
+    security_handler_factory.get_token_info_remote = mock.MagicMock(return_value="get_token_info_remote_result")
 
     op_spec = make_operation(OPERATION1)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_REMOTE,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_REMOTE,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 1
-    assert security_decorator.args[0][0] == 'verify_oauth_result'
-    verify_oauth.assert_called_with('get_token_info_remote_result', security_handler_factory.validate_scope, ['uid'])
-    security_handler_factory.get_token_info_remote.assert_called_with('https://oauth.example/token_info')
+    assert security_decorator.args[0][0] == "verify_oauth_result"
+    verify_oauth.assert_called_with("get_token_info_remote_result", security_handler_factory.validate_scope, ["uid"])
+    security_handler_factory.get_token_info_remote.assert_called_with("https://oauth.example/token_info")
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
 
     expected_body_schema = op_spec["parameters"][0]["schema"]
-    expected_body_schema.update({'definitions': DEFINITIONS})
+    expected_body_schema.update({"definitions": DEFINITIONS})
     assert operation.body_schema == expected_body_schema
 
 
 def test_operation_array(api):
     op_spec = make_operation(OPERATION7)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_REMOTE,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_REMOTE,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
-    expected_body_schema = {
-        'type': 'array',
-        'items': DEFINITIONS["new_stack"],
-        'definitions': DEFINITIONS
-    }
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
+    expected_body_schema = {"type": "array", "items": DEFINITIONS["new_stack"], "definitions": DEFINITIONS}
     assert operation.body_schema == expected_body_schema
 
 
 def test_operation_composed_definition(api):
     op_spec = make_operation(OPERATION8)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_REMOTE,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_REMOTE,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
     expected_body_schema = op_spec["parameters"][0]["schema"]
-    expected_body_schema.update({'definitions': DEFINITIONS})
+    expected_body_schema.update({"definitions": DEFINITIONS})
     assert operation.body_schema == expected_body_schema
 
 
 def test_operation_local_security_oauth2(api):
-    verify_oauth = mock.MagicMock(return_value='verify_oauth_result')
+    verify_oauth = mock.MagicMock(return_value="verify_oauth_result")
     api.security_handler_factory.verify_oauth = verify_oauth
 
     op_spec = make_operation(OPERATION8)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_LOCAL,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_LOCAL,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 1
-    assert security_decorator.args[0][0] == 'verify_oauth_result'
-    verify_oauth.assert_called_with(math.ceil, api.security_handler_factory.validate_scope, ['uid'])
+    assert security_decorator.args[0][0] == "verify_oauth_result"
+    verify_oauth.assert_called_with(math.ceil, api.security_handler_factory.validate_scope, ["uid"])
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
     expected_body_schema = op_spec["parameters"][0]["schema"]
-    expected_body_schema.update({'definitions': DEFINITIONS})
+    expected_body_schema.update({"definitions": DEFINITIONS})
     assert operation.body_schema == expected_body_schema
 
 
 def test_operation_local_security_duplicate_token_info(api):
-    verify_oauth = mock.MagicMock(return_value='verify_oauth_result')
+    verify_oauth = mock.MagicMock(return_value="verify_oauth_result")
     api.security_handler_factory.verify_oauth = verify_oauth
 
     op_spec = make_operation(OPERATION8)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_BOTH,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_BOTH,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 1
-    assert security_decorator.args[0][0] == 'verify_oauth_result'
-    verify_oauth.call_args.assert_called_with(math.ceil, api.security_handler_factory.validate_scope, ['uid'])
+    assert security_decorator.args[0][0] == "verify_oauth_result"
+    verify_oauth.call_args.assert_called_with(math.ceil, api.security_handler_factory.validate_scope, ["uid"])
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
     expected_body_schema = op_spec["parameters"][0]["schema"]
-    expected_body_schema.update({'definitions': DEFINITIONS})
+    expected_body_schema.update({"definitions": DEFINITIONS})
     assert operation.body_schema == expected_body_schema
 
 
 def test_multi_body(api):
     with pytest.raises(InvalidSpecification) as exc_info:  # type: py.code.ExceptionInfo
         op_spec = make_operation(OPERATION2)
-        operation = Swagger2Operation(api=api,
-                                      method='GET',
-                                      path='endpoint',
-                                      path_parameters=[],
-                                      operation=op_spec,
-                                      app_produces=['application/json'],
-                                      app_consumes=['application/json'],
-                                      app_security=[],
-                                      security_definitions={},
-                                      definitions=DEFINITIONS,
-                                      parameter_definitions=PARAMETER_DEFINITIONS,
-                                      resolver=Resolver())
+        operation = Swagger2Operation(
+            api=api,
+            method="GET",
+            path="endpoint",
+            path_parameters=[],
+            operation=op_spec,
+            app_produces=["application/json"],
+            app_consumes=["application/json"],
+            app_security=[],
+            security_definitions={},
+            definitions=DEFINITIONS,
+            parameter_definitions=PARAMETER_DEFINITIONS,
+            resolver=Resolver(),
+        )
         operation.body_schema
 
     exception = exc_info.value
@@ -457,71 +511,77 @@ def test_multi_body(api):
 
 def test_no_token_info(api):
     op_spec = make_operation(OPERATION1)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=SECURITY_DEFINITIONS_WO_INFO,
-                                  security_definitions=SECURITY_DEFINITIONS_WO_INFO,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=SECURITY_DEFINITIONS_WO_INFO,
+        security_definitions=SECURITY_DEFINITIONS_WO_INFO,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 0
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["uid"]}]
 
-    expected_body_schema = {'definitions': DEFINITIONS}
+    expected_body_schema = {"definitions": DEFINITIONS}
     expected_body_schema.update(DEFINITIONS["new_stack"])
     assert operation.body_schema == expected_body_schema
 
 
 def test_multiple_security_schemes_and(api):
     """Tests an operation with multiple security schemes in AND fashion."""
+
     def return_api_key_name(func, in_, name):
         return name
+
     verify_api_key = mock.MagicMock(side_effect=return_api_key_name)
     api.security_handler_factory.verify_api_key = verify_api_key
-    verify_multiple = mock.MagicMock(return_value='verify_multiple_result')
+    verify_multiple = mock.MagicMock(return_value="verify_multiple_result")
     api.security_handler_factory.verify_multiple_schemes = verify_multiple
 
     op_spec = make_operation(OPERATION9)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=SECURITY_DEFINITIONS_2_KEYS,
-                                  security_definitions=SECURITY_DEFINITIONS_2_KEYS,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=SECURITY_DEFINITIONS_2_KEYS,
+        security_definitions=SECURITY_DEFINITIONS_2_KEYS,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
     assert verify_api_key.call_count == 2
-    verify_api_key.assert_any_call(math.ceil, 'header', 'X-Auth-1')
-    verify_api_key.assert_any_call(math.ceil, 'header', 'X-Auth-2')
+    verify_api_key.assert_any_call(math.ceil, "header", "X-Auth-1")
+    verify_api_key.assert_any_call(math.ceil, "header", "X-Auth-2")
     # Assert verify_multiple_schemes is called with mapping from scheme name
     # to result of security_handler_factory.verify_api_key()
-    verify_multiple.assert_called_with({'key1': 'X-Auth-1', 'key2': 'X-Auth-2'})
+    verify_multiple.assert_called_with({"key1": "X-Auth-1", "key2": "X-Auth-2"})
 
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 1
-    assert security_decorator.args[0][0] == 'verify_multiple_result'
+    assert security_decorator.args[0][0] == "verify_multiple_result"
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'key1': [], 'key2': []}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"key1": [], "key2": []}]
 
 
 def test_multiple_oauth_in_and(api, caplog):
@@ -529,126 +589,153 @@ def test_multiple_oauth_in_and(api, caplog):
     These should be ignored and raise a warning.
     """
     caplog.set_level(logging.WARNING, logger="firetail.operations.secure")
-    verify_oauth = mock.MagicMock(return_value='verify_oauth_result')
+    verify_oauth = mock.MagicMock(return_value="verify_oauth_result")
     api.security_handler_factory.verify_oauth = verify_oauth
 
     op_spec = make_operation(OPERATION10)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=SECURITY_DEFINITIONS_2_OAUTH,
-                                  security_definitions=SECURITY_DEFINITIONS_2_OAUTH,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=SECURITY_DEFINITIONS_2_OAUTH,
+        security_definitions=SECURITY_DEFINITIONS_2_OAUTH,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
 
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 0
     assert security_decorator.args[0] == []
 
-    assert '... multiple OAuth2 security schemes in AND fashion not supported' in caplog.text
+    assert "... multiple OAuth2 security schemes in AND fashion not supported" in caplog.text
 
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth_1': ['uid'], 'oauth_2': ['uid']}]
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth_1": ["uid"], "oauth_2": ["uid"]}]
 
 
 def test_parameter_reference(api):
     op_spec = make_operation(OPERATION3, definitions=False)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
-    assert operation.parameters == [{'in': 'path', 'type': 'integer'}]
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
+    assert operation.parameters == [{"in": "path", "type": "integer"}]
 
 
 def test_default(api):
     op_spec = make_operation(OPERATION4)
-    op_spec['parameters'][1]['default'] = 1
+    op_spec["parameters"][1]["default"] = 1
     Swagger2Operation(
-        api=api, method='GET', path='endpoint', path_parameters=[],
-        operation=op_spec, app_produces=['application/json'],
-        app_consumes=['application/json'], app_security=[],
-        security_definitions={}, definitions=DEFINITIONS,
-        parameter_definitions=PARAMETER_DEFINITIONS, resolver=Resolver()
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
     )
     op_spec = make_operation(OPERATION6, parameters=False)
-    op_spec['parameters'][0]['default'] = {
-        'keep_stacks': 1,
-        'image_version': 'one',
-        'senza_yaml': 'senza.yaml',
-        'new_traffic': 100
+    op_spec["parameters"][0]["default"] = {
+        "keep_stacks": 1,
+        "image_version": "one",
+        "senza_yaml": "senza.yaml",
+        "new_traffic": 100,
     }
     Swagger2Operation(
-        api=api, method='POST', path='endpoint', path_parameters=[],
-        operation=op_spec, app_produces=['application/json'],
-        app_consumes=['application/json'], app_security=[],
-        security_definitions={}, definitions=DEFINITIONS,
-        parameter_definitions={}, resolver=Resolver()
+        api=api,
+        method="POST",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions=DEFINITIONS,
+        parameter_definitions={},
+        resolver=Resolver(),
     )
 
 
 def test_get_path_parameter_types(api):
     op_spec = make_operation(OPERATION1, parameters=False)
-    op_spec['parameters'] = [
-        {'in': 'path', 'type': 'int', 'name': 'int_path'},
-        {'in': 'path', 'type': 'string', 'name': 'string_path'},
-        {'in': 'path', 'type': 'string', 'format': 'path', 'name': 'path_path'}
+    op_spec["parameters"] = [
+        {"in": "path", "type": "int", "name": "int_path"},
+        {"in": "path", "type": "string", "name": "string_path"},
+        {"in": "path", "type": "string", "format": "path", "name": "path_path"},
     ]
 
     operation = Swagger2Operation(
-        api=api, method='GET', path='endpoint', path_parameters=[],
-        operation=op_spec, app_produces=['application/json'],
-        app_consumes=['application/json'],
-        definitions=DEFINITIONS, resolver=Resolver()
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        definitions=DEFINITIONS,
+        resolver=Resolver(),
     )
 
-    assert {'int_path': 'int', 'string_path': 'string', 'path_path': 'path'} == operation.get_path_parameter_types()
+    assert {"int_path": "int", "string_path": "string", "path_path": "path"} == operation.get_path_parameter_types()
 
 
 def test_oauth_scopes_in_or(api):
     """Tests whether an OAuth security scheme with 2 different possible scopes is correctly handled."""
-    verify_oauth = mock.MagicMock(return_value='verify_oauth_result')
+    verify_oauth = mock.MagicMock(return_value="verify_oauth_result")
     api.security_handler_factory.verify_oauth = verify_oauth
 
     op_spec = make_operation(OPERATION11)
-    operation = Swagger2Operation(api=api,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation=op_spec,
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions=SECURITY_DEFINITIONS_LOCAL,
-                                  definitions=DEFINITIONS,
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
+    operation = Swagger2Operation(
+        api=api,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation=op_spec,
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions=SECURITY_DEFINITIONS_LOCAL,
+        definitions=DEFINITIONS,
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
     assert isinstance(operation.function, types.FunctionType)
     security_decorator = operation.security_decorator
     assert len(security_decorator.args[0]) == 2
-    assert security_decorator.args[0][0] == 'verify_oauth_result'
-    assert security_decorator.args[0][1] == 'verify_oauth_result'
-    verify_oauth.assert_has_calls([
-        mock.call(math.ceil, api.security_handler_factory.validate_scope, ['myscope']),
-        mock.call(math.ceil, api.security_handler_factory.validate_scope, ['myscope2']),
-    ])
-
-    assert operation.method == 'GET'
-    assert operation.produces == ['application/json']
-    assert operation.consumes == ['application/json']
-    assert operation.security == [{'oauth': ['myscope']}, {'oauth': ['myscope2']}]
+    assert security_decorator.args[0][0] == "verify_oauth_result"
+    assert security_decorator.args[0][1] == "verify_oauth_result"
+    verify_oauth.assert_has_calls(
+        [
+            mock.call(math.ceil, api.security_handler_factory.validate_scope, ["myscope"]),
+            mock.call(math.ceil, api.security_handler_factory.validate_scope, ["myscope2"]),
+        ]
+    )
+
+    assert operation.method == "GET"
+    assert operation.produces == ["application/json"]
+    assert operation.consumes == ["application/json"]
+    assert operation.security == [{"oauth": ["myscope"]}, {"oauth": ["myscope2"]}]
diff --git a/tests/test_references.py b/tests/test_references.py
index 389b689..eb56100 100644
--- a/tests/test_references.py
+++ b/tests/test_references.py
@@ -5,60 +5,36 @@
 from firetail.json_schema import RefResolutionError, resolve_refs
 
 DEFINITIONS = {
-    'new_stack': {
-        'required': [
-            'image_version',
-            'keep_stacks',
-            'new_traffic',
-            'senza_yaml'
-        ],
-        'type': 'object',
-        'properties': {
-            'keep_stacks': {
-                'type': 'integer',
-                'description': 'Number of older stacks to keep'
-            },
-            'image_version': {
-                'type': 'string',
-                'description': 'Docker image version to deploy'
-            },
-            'senza_yaml': {
-                'type': 'string',
-                'description': 'YAML to provide to senza'
-            },
-            'new_traffic': {
-                'type': 'integer',
-                'description': 'Percentage of the traffic'
-            }
-        }
+    "new_stack": {
+        "required": ["image_version", "keep_stacks", "new_traffic", "senza_yaml"],
+        "type": "object",
+        "properties": {
+            "keep_stacks": {"type": "integer", "description": "Number of older stacks to keep"},
+            "image_version": {"type": "string", "description": "Docker image version to deploy"},
+            "senza_yaml": {"type": "string", "description": "YAML to provide to senza"},
+            "new_traffic": {"type": "integer", "description": "Percentage of the traffic"},
+        },
     },
-    'composed': {
-        'required': ['test'],
-        'type': 'object',
-        'properties': {
-            'test': {
-                'schema': {'$ref': '#/definitions/new_stack'}
-            }
-        }
+    "composed": {
+        "required": ["test"],
+        "type": "object",
+        "properties": {"test": {"schema": {"$ref": "#/definitions/new_stack"}}},
     },
-    'problem': {"some": "thing"}
+    "problem": {"some": "thing"},
 }
-PARAMETER_DEFINITIONS = {'myparam': {'in': 'path', 'type': 'integer'}}
+PARAMETER_DEFINITIONS = {"myparam": {"in": "path", "type": "integer"}}
 
 
 @pytest.fixture
 def api():
-  return mock.MagicMock(jsonifier=Jsonifier)
+    return mock.MagicMock(jsonifier=Jsonifier)
 
 
 def test_non_existent_reference(api):
     op_spec = {
-        'parameters': [{
-            'in': 'body',
-            'name': 'new_stack',
-            'required': True,
-            'schema': {'$ref': '#/definitions/new_stack'}
-        }]
+        "parameters": [
+            {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/definitions/new_stack"}}
+        ]
     }
     with pytest.raises(RefResolutionError) as exc_info:  # type: py.code.ExceptionInfo
         resolve_refs(op_spec, {})
@@ -69,46 +45,31 @@ def test_non_existent_reference(api):
 
 def test_invalid_reference(api):
     op_spec = {
-        'parameters': [{
-            'in': 'body',
-            'name': 'new_stack',
-            'required': True,
-            'schema': {'$ref': '#/notdefinitions/new_stack'}
-        }]
+        "parameters": [
+            {"in": "body", "name": "new_stack", "required": True, "schema": {"$ref": "#/notdefinitions/new_stack"}}
+        ]
     }
 
     with pytest.raises(RefResolutionError) as exc_info:  # type: py.code.ExceptionInfo
-        resolve_refs(op_spec, {
-            "definitions": DEFINITIONS,
-            "parameters": PARAMETER_DEFINITIONS
-        })
+        resolve_refs(op_spec, {"definitions": DEFINITIONS, "parameters": PARAMETER_DEFINITIONS})
 
     exception = exc_info.value
     assert "notdefinitions/new_stack" in str(exception)
 
 
 def test_resolve_invalid_reference(api):
-    op_spec = {
-        'operationId': 'fakeapi.hello.post_greeting',
-        'parameters': [{'$ref': '/parameters/fail'}]
-    }
+    op_spec = {"operationId": "fakeapi.hello.post_greeting", "parameters": [{"$ref": "/parameters/fail"}]}
 
     with pytest.raises(RefResolutionError) as exc_info:
-        resolve_refs(op_spec, {
-            "parameters": PARAMETER_DEFINITIONS
-        })
+        resolve_refs(op_spec, {"parameters": PARAMETER_DEFINITIONS})
 
     exception = exc_info.value
     assert "parameters/fail" in str(exception)
 
 
 def test_resolve_web_reference(api):
-    op_spec = {
-        'parameters': [{'$ref': 'https://reallyfake.asd/parameters.json'}]
-    }
-    store = {
-        "https://reallyfake.asd/parameters.json": {"name": "test"}
-    }
+    op_spec = {"parameters": [{"$ref": "https://reallyfake.asd/parameters.json"}]}
+    store = {"https://reallyfake.asd/parameters.json": {"name": "test"}}
 
     spec = resolve_refs(op_spec, store=store)
     assert spec["parameters"][0]["name"] == "test"
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index 2565437..d720c00 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -4,21 +4,21 @@
 from firetail.operations import Swagger2Operation
 from firetail.resolver import RelativeResolver, Resolver, RestyResolver
 
-PARAMETER_DEFINITIONS = {'myparam': {'in': 'path', 'type': 'integer'}}
+PARAMETER_DEFINITIONS = {"myparam": {"in": "path", "type": "integer"}}
 
 
 def test_standard_get_function():
-    function = Resolver().resolve_function_from_operation_id('firetail.FlaskApp.common_error_handler')
+    function = Resolver().resolve_function_from_operation_id("firetail.FlaskApp.common_error_handler")
     assert function == firetail.FlaskApp.common_error_handler
 
 
 def test_relative_get_function():
-    function = RelativeResolver('firetail').resolve_function_from_operation_id('firetail.FlaskApp.common_error_handler')
+    function = RelativeResolver("firetail").resolve_function_from_operation_id("firetail.FlaskApp.common_error_handler")
     assert function == firetail.FlaskApp.common_error_handler
 
 
 def test_resty_get_function():
-    function = RestyResolver('firetail').resolve_function_from_operation_id('firetail.FlaskApp.common_error_handler')
+    function = RestyResolver("firetail").resolve_function_from_operation_id("firetail.FlaskApp.common_error_handler")
     assert function == firetail.FlaskApp.common_error_handler
 
 
@@ -28,306 +28,342 @@ def test_missing_operation_id():
     with pytest.raises(ResolverError):
         Resolver().resolve_function_from_operation_id(None)
     with pytest.raises(ResolverError):
-        RelativeResolver('firetail').resolve_function_from_operation_id(None)
+        RelativeResolver("firetail").resolve_function_from_operation_id(None)
     with pytest.raises(ResolverError):
-        RestyResolver('firetail').resolve_function_from_operation_id(None)
+        RestyResolver("firetail").resolve_function_from_operation_id(None)
 
 
 def test_bad_operation_id():
     # Unresolvable operationIDs should result in a well-defined error that can
     # be handled upstream.
     with pytest.raises(ResolverError):
-        Resolver().resolve_function_from_operation_id('ohai.I.do.not.exist')
+        Resolver().resolve_function_from_operation_id("ohai.I.do.not.exist")
     with pytest.raises(ResolverError):
-        RelativeResolver('firetail').resolve_function_from_operation_id('ohai.I.do.not.exist')
+        RelativeResolver("firetail").resolve_function_from_operation_id("ohai.I.do.not.exist")
     with pytest.raises(ResolverError):
-        RestyResolver('firetail').resolve_function_from_operation_id('ohai.I.do.not.exist')
+        RestyResolver("firetail").resolve_function_from_operation_id("ohai.I.do.not.exist")
 
 
 def test_standard_resolve_x_router_controller():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'x-swagger-router-controller': 'fakeapi.hello',
-                                      'operationId': 'post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=Resolver())
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "x-swagger-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=Resolver(),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_x_router_controller():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'x-swagger-router-controller': 'fakeapi.hello',
-                                      'operationId': 'post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RelativeResolver('root_path'))
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "x-swagger-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RelativeResolver("root_path"),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_operation_id():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'operationId': 'hello.post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RelativeResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "operationId": "hello.post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RelativeResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_operation_id_with_module():
     import fakeapi
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'operationId': 'hello.post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RelativeResolver(fakeapi))
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "operationId": "hello.post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RelativeResolver(fakeapi),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_operation_id():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'operationId': 'fakeapi.hello.post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "operationId": "fakeapi.hello.post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_x_router_controller_with_operation_id():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='endpoint',
-                                  path_parameters=[],
-                                  operation={
-                                      'x-swagger-router-controller': 'fakeapi.hello',
-                                      'operationId': 'post_greeting',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="endpoint",
+        path_parameters=[],
+        operation={
+            "x-swagger-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_x_router_controller_without_operation_id():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello/{id}',
-                                  path_parameters=[],
-                                  operation={'x-swagger-router-controller': 'fakeapi.hello'},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello/{id}",
+        path_parameters=[],
+        operation={"x-swagger-router-controller": "fakeapi.hello"},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.get"
 
 
 def test_resty_resolve_with_default_module_name():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello/{id}',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello/{id}",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.get"
 
 
 def test_resty_resolve_with_default_module_name_nested():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello/{id}/world',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.world.search'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello/{id}/world",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.world.search"
 
 
 def test_resty_resolve_with_default_module_name_lowercase_verb():
-    operation = Swagger2Operation(api=None,
-                                  method='get',
-                                  path='/hello/{id}',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="get",
+        path="/hello/{id}",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.get"
+
 
 def test_resty_resolve_with_default_module_name_lowercase_verb_nested():
-    operation = Swagger2Operation(api=None,
-                                  method='get',
-                                  path='/hello/world/{id}',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.world.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="get",
+        path="/hello/world/{id}",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.world.get"
 
 
 def test_resty_resolve_with_default_module_name_will_translate_dashes_in_resource_name():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/foo-bar',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.foo_bar.search'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/foo-bar",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.foo_bar.search"
 
 
 def test_resty_resolve_with_default_module_name_can_resolve_api_root():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.get'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.get"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_get_as_search():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.search'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.search"
 
 
 def test_resty_resolve_with_default_module_name_and_x_router_controller_will_resolve_resource_root_get_as_search():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello',
-                                  path_parameters=[],
-                                  operation={
-                                      'x-swagger-router-controller': 'fakeapi.hello',
-                                  },
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.search'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello",
+        path_parameters=[],
+        operation={
+            "x-swagger-router-controller": "fakeapi.hello",
+        },
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.search"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_as_configured():
-    operation = Swagger2Operation(api=None,
-                                  method='GET',
-                                  path='/hello',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi', 'api_list'))
-    assert operation.operation_id == 'fakeapi.hello.api_list'
+    operation = Swagger2Operation(
+        api=None,
+        method="GET",
+        path="/hello",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi", "api_list"),
+    )
+    assert operation.operation_id == "fakeapi.hello.api_list"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_post_as_post():
-    operation = Swagger2Operation(api=None,
-                                  method='POST',
-                                  path='/hello',
-                                  path_parameters=[],
-                                  operation={},
-                                  app_produces=['application/json'],
-                                  app_consumes=['application/json'],
-                                  app_security=[],
-                                  security_definitions={},
-                                  definitions={},
-                                  parameter_definitions=PARAMETER_DEFINITIONS,
-                                  resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.post'
+    operation = Swagger2Operation(
+        api=None,
+        method="POST",
+        path="/hello",
+        path_parameters=[],
+        operation={},
+        app_produces=["application/json"],
+        app_consumes=["application/json"],
+        app_security=[],
+        security_definitions={},
+        definitions={},
+        parameter_definitions=PARAMETER_DEFINITIONS,
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.post"
diff --git a/tests/test_resolver3.py b/tests/test_resolver3.py
index 54f0617..00a2d19 100644
--- a/tests/test_resolver3.py
+++ b/tests/test_resolver3.py
@@ -1,259 +1,261 @@
 from firetail.operations import OpenAPIOperation
 from firetail.resolver import RelativeResolver, Resolver, RestyResolver
 
-COMPONENTS = {'parameters': {'myparam': {'in': 'path', 'schema': {'type': 'integer'}}}}
+COMPONENTS = {"parameters": {"myparam": {"in": "path", "schema": {"type": "integer"}}}}
 
 
 def test_standard_resolve_x_router_controller():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.hello',
-            'operationId': 'post_greeting',
+            "x-openapi-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=Resolver()
+        resolver=Resolver(),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_x_router_controller():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.hello',
-            'operationId': 'post_greeting',
+            "x-openapi-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RelativeResolver('root_path')
+        resolver=RelativeResolver("root_path"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'operationId': 'hello.post_greeting',
+            "operationId": "hello.post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RelativeResolver('fakeapi')
+        resolver=RelativeResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_relative_resolve_operation_id_with_module():
     import fakeapi
+
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'operationId': 'hello.post_greeting',
+            "operationId": "hello.post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RelativeResolver(fakeapi)
+        resolver=RelativeResolver(fakeapi),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'operationId': 'fakeapi.hello.post_greeting',
+            "operationId": "fakeapi.hello.post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_x_router_controller_with_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.hello',
-            'operationId': 'post_greeting',
+            "x-openapi-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_resty_resolve_x_router_controller_without_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello/{id}',
+        method="GET",
+        path="/hello/{id}",
         path_parameters=[],
-        operation={'x-openapi-router-controller': 'fakeapi.hello'},
+        operation={"x-openapi-router-controller": "fakeapi.hello"},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.hello.get'
+        resolver=RestyResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.hello.get"
 
 
 def test_resty_resolve_with_default_module_name():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello/{id}',
+        method="GET",
+        path="/hello/{id}",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.get'
+    assert operation.operation_id == "fakeapi.hello.get"
 
 
 def test_resty_resolve_with_default_module_name():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello/{id}/world',
+        method="GET",
+        path="/hello/{id}/world",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.world.search'
+    assert operation.operation_id == "fakeapi.hello.world.search"
 
 
 def test_resty_resolve_with_default_module_name_lowercase_verb():
     operation = OpenAPIOperation(
         api=None,
-        method='get',
-        path='/hello/{id}',
+        method="get",
+        path="/hello/{id}",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.get'
+    assert operation.operation_id == "fakeapi.hello.get"
 
 
 def test_resty_resolve_with_default_module_name_lowercase_verb_nested():
     operation = OpenAPIOperation(
         api=None,
-        method='get',
-        path='/hello/world/{id}',
+        method="get",
+        path="/hello/world/{id}",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.world.get'
+    assert operation.operation_id == "fakeapi.hello.world.get"
 
 
 def test_resty_resolve_with_default_module_name_will_translate_dashes_in_resource_name():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/foo-bar',
+        method="GET",
+        path="/foo-bar",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.foo_bar.search'
+    assert operation.operation_id == "fakeapi.foo_bar.search"
 
 
 def test_resty_resolve_with_default_module_name_can_resolve_api_root():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/',
+        method="GET",
+        path="/",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.get'
+    assert operation.operation_id == "fakeapi.get"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_get_as_search():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello',
+        method="GET",
+        path="/hello",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.search'
+    assert operation.operation_id == "fakeapi.hello.search"
 
 
 def test_resty_resolve_with_default_module_name_and_x_router_controller_will_resolve_resource_root_get_as_search():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello',
+        method="GET",
+        path="/hello",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.hello',
+            "x-openapi-router-controller": "fakeapi.hello",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.search'
+    assert operation.operation_id == "fakeapi.hello.search"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_as_configured():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello',
+        method="GET",
+        path="/hello",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi', 'api_list')
+        resolver=RestyResolver("fakeapi", "api_list"),
     )
-    assert operation.operation_id == 'fakeapi.hello.api_list'
+    assert operation.operation_id == "fakeapi.hello.api_list"
 
 
 def test_resty_resolve_with_default_module_name_will_resolve_resource_root_post_as_post():
     operation = OpenAPIOperation(
         api=None,
-        method='POST',
-        path='/hello',
+        method="POST",
+        path="/hello",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=RestyResolver('fakeapi')
+        resolver=RestyResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post'
+    assert operation.operation_id == "fakeapi.hello.post"
diff --git a/tests/test_resolver_methodview.py b/tests/test_resolver_methodview.py
index fea281b..95be8f2 100644
--- a/tests/test_resolver_methodview.py
+++ b/tests/test_resolver_methodview.py
@@ -1,179 +1,184 @@
 from firetail.operations import OpenAPIOperation
 from firetail.resolver import MethodViewResolver, Resolver
 
-COMPONENTS = {'parameters': {'myparam': {'in': 'path', 'schema': {'type': 'integer'}}}}
+COMPONENTS = {"parameters": {"myparam": {"in": "path", "schema": {"type": "integer"}}}}
 
 
 def test_standard_resolve_x_router_controller():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.hello',
-            'operationId': 'post_greeting',
+            "x-openapi-router-controller": "fakeapi.hello",
+            "operationId": "post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=Resolver()
+        resolver=Resolver(),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
+
 
 def test_methodview_resolve_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'operationId': 'fakeapi.hello.post_greeting',
+            "operationId": "fakeapi.hello.post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.hello.post_greeting'
+    assert operation.operation_id == "fakeapi.hello.post_greeting"
 
 
 def test_methodview_resolve_x_router_controller_with_operation_id():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='endpoint',
+        method="GET",
+        path="endpoint",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.ExampleMethodView',
-            'operationId': 'post_greeting',
+            "x-openapi-router-controller": "fakeapi.ExampleMethodView",
+            "operationId": "post_greeting",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.post_greeting'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.post_greeting"
 
 
 def test_methodview_resolve_x_router_controller_without_operation_id():
-    operation = OpenAPIOperation(api=None,
-                          method='GET',
-                          path='/hello/{id}',
-                          path_parameters=[],
-                          operation={'x-openapi-router-controller': 'fakeapi.example_method'},
-                          app_security=[],
-                          components=COMPONENTS,
-                          resolver=MethodViewResolver('fakeapi'))
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.get'
+    operation = OpenAPIOperation(
+        api=None,
+        method="GET",
+        path="/hello/{id}",
+        path_parameters=[],
+        operation={"x-openapi-router-controller": "fakeapi.example_method"},
+        app_security=[],
+        components=COMPONENTS,
+        resolver=MethodViewResolver("fakeapi"),
+    )
+    assert operation.operation_id == "fakeapi.ExampleMethodView.get"
 
 
 def test_methodview_resolve_with_default_module_name():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/example_method/{id}',
+        method="GET",
+        path="/example_method/{id}",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.get'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.get"
 
 
 def test_methodview_resolve_with_default_module_name_lowercase_verb():
     operation = OpenAPIOperation(
         api=None,
-        method='get',
-        path='/example_method/{id}',
+        method="get",
+        path="/example_method/{id}",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.get'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.get"
 
 
 def test_methodview_resolve_with_default_module_name_will_translate_dashes_in_resource_name():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/example-method',
+        method="GET",
+        path="/example-method",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.search'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.search"
 
 
 def test_methodview_resolve_with_default_module_name_can_resolve_api_root():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/',
+        method="GET",
+        path="/",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi.example_method',)
+        resolver=MethodViewResolver(
+            "fakeapi.example_method",
+        ),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.get'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.get"
 
 
 def test_methodview_resolve_with_default_module_name_will_resolve_resource_root_get_as_search():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/example_method',
+        method="GET",
+        path="/example_method",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.search'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.search"
 
 
 def test_methodview_resolve_with_default_module_name_and_x_router_controller_will_resolve_resource_root_get_as_search():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/hello',
+        method="GET",
+        path="/hello",
         path_parameters=[],
         operation={
-            'x-openapi-router-controller': 'fakeapi.example_method',
+            "x-openapi-router-controller": "fakeapi.example_method",
         },
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.search'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.search"
 
 
 def test_methodview_resolve_with_default_module_name_will_resolve_resource_root_as_configured():
     operation = OpenAPIOperation(
         api=None,
-        method='GET',
-        path='/example_method',
+        method="GET",
+        path="/example_method",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi', 'api_list')
+        resolver=MethodViewResolver("fakeapi", "api_list"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.api_list'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.api_list"
 
 
 def test_methodview_resolve_with_default_module_name_will_resolve_resource_root_post_as_post():
     operation = OpenAPIOperation(
         api=None,
-        method='POST',
-        path='/example_method',
+        method="POST",
+        path="/example_method",
         path_parameters=[],
         operation={},
         app_security=[],
         components=COMPONENTS,
-        resolver=MethodViewResolver('fakeapi')
+        resolver=MethodViewResolver("fakeapi"),
     )
-    assert operation.operation_id == 'fakeapi.ExampleMethodView.post'
+    assert operation.operation_id == "fakeapi.ExampleMethodView.post"
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 256ee0f..78067a8 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -7,14 +7,14 @@
 
 
 def test_get_function_from_name():
-    function = utils.get_function_from_name('math.ceil')
+    function = utils.get_function_from_name("math.ceil")
     assert function == math.ceil
     assert function(2.7) == 3
 
 
 def test_get_function_from_name_no_module():
     with pytest.raises(ValueError):
-        utils.get_function_from_name('math')
+        utils.get_function_from_name("math")
 
 
 def test_get_function_from_name_attr_error(monkeypatch):
@@ -27,36 +27,36 @@ def test_get_function_from_name_attr_error(monkeypatch):
     deep_attr_mock.side_effect = AttributeError
     monkeypatch.setattr("firetail.utils.deep_getattr", deep_attr_mock)
     with pytest.raises(AttributeError):
-        utils.get_function_from_name('math.ceil')
+        utils.get_function_from_name("math.ceil")
 
 
 def test_get_function_from_name_for_class_method():
-    function = utils.get_function_from_name('firetail.FlaskApp.common_error_handler')
+    function = utils.get_function_from_name("firetail.FlaskApp.common_error_handler")
     assert function == firetail.FlaskApp.common_error_handler
 
 
 def test_boolean():
-    assert utils.boolean('true')
-    assert utils.boolean('True')
-    assert utils.boolean('TRUE')
+    assert utils.boolean("true")
+    assert utils.boolean("True")
+    assert utils.boolean("TRUE")
     assert utils.boolean(True)
-    assert not utils.boolean('false')
-    assert not utils.boolean('False')
-    assert not utils.boolean('FALSE')
+    assert not utils.boolean("false")
+    assert not utils.boolean("False")
+    assert not utils.boolean("FALSE")
     assert not utils.boolean(False)
 
     with pytest.raises(ValueError):
-        utils.boolean('foo')
+        utils.boolean("foo")
 
     with pytest.raises(ValueError):
         utils.boolean(None)
 
 
 def test_deep_get_dict():
-    obj = {'type': 'object', 'properties': {'id': {'type': 'string'}}}
-    assert utils.deep_get(obj, ['properties', 'id']) == {'type': 'string'}
+    obj = {"type": "object", "properties": {"id": {"type": "string"}}}
+    assert utils.deep_get(obj, ["properties", "id"]) == {"type": "string"}
 
 
 def test_deep_get_list():
-    obj = [{'type': 'object', 'properties': {'id': {'type': 'string'}}}]
-    assert utils.deep_get(obj, ['0', 'properties', 'id']) == {'type': 'string'}
+    obj = [{"type": "object", "properties": {"id": {"type": "string"}}}]
+    assert utils.deep_get(obj, ["0", "properties", "id"]) == {"type": "string"}
diff --git a/tests/test_validation.py b/tests/test_validation.py
index ae12c37..7175938 100644
--- a/tests/test_validation.py
+++ b/tests/test_validation.py
@@ -8,86 +8,94 @@
 
 
 def test_parameter_validator(monkeypatch):
-    request = MagicMock(name='request')
+    request = MagicMock(name="request")
     request.args = {}
     request.headers = {}
     request.cookies = {}
     request.params = {}
-    app = MagicMock(name='app')
+    app = MagicMock(name="app")
 
     app.response_class = flask.Response
-    monkeypatch.setattr('flask.request', request)
-    monkeypatch.setattr('flask.current_app', app)
+    monkeypatch.setattr("flask.request", request)
+    monkeypatch.setattr("flask.current_app", app)
 
     def orig_handler(*args, **kwargs):
-        return 'OK'
+        return "OK"
 
-    params = [{'name': 'p1', 'in': 'path', 'type': 'integer', 'required': True},
-              {'name': 'h1', 'in': 'header', 'type': 'string', 'enum': ['a', 'b']},
-              {'name': 'c1', 'in': 'cookie', 'type': 'string', 'enum': ['a', 'b']},
-              {'name': 'q1', 'in': 'query', 'type': 'integer', 'maximum': 3},
-              {'name': 'a1', 'in': 'query', 'type': 'array', 'minItems': 2, 'maxItems': 3,
-               'items': {'type': 'integer', 'minimum': 0}}]
+    params = [
+        {"name": "p1", "in": "path", "type": "integer", "required": True},
+        {"name": "h1", "in": "header", "type": "string", "enum": ["a", "b"]},
+        {"name": "c1", "in": "cookie", "type": "string", "enum": ["a", "b"]},
+        {"name": "q1", "in": "query", "type": "integer", "maximum": 3},
+        {
+            "name": "a1",
+            "in": "query",
+            "type": "array",
+            "minItems": 2,
+            "maxItems": 3,
+            "items": {"type": "integer", "minimum": 0},
+        },
+    ]
     validator = ParameterValidator(params, FlaskApi)
     handler = validator(orig_handler)
 
-    kwargs = {'query': {}, 'headers': {}, 'cookies': {}}
+    kwargs = {"query": {}, "headers": {}, "cookies": {}}
     request = MagicMock(path_params={}, **kwargs)
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail == "Missing path parameter 'p1'"
-    request = MagicMock(path_params={'p1': '123'}, **kwargs)
-    assert handler(request) == 'OK'
-    request = MagicMock(path_params={'p1': ''}, **kwargs)
+    request = MagicMock(path_params={"p1": "123"}, **kwargs)
+    assert handler(request) == "OK"
+    request = MagicMock(path_params={"p1": ""}, **kwargs)
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail == "Wrong type, expected 'integer' for path parameter 'p1'"
-    request = MagicMock(path_params={'p1': 'foo'}, **kwargs)
+    request = MagicMock(path_params={"p1": "foo"}, **kwargs)
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail == "Wrong type, expected 'integer' for path parameter 'p1'"
-    request = MagicMock(path_params={'p1': '1.2'}, **kwargs)
+    request = MagicMock(path_params={"p1": "1.2"}, **kwargs)
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail == "Wrong type, expected 'integer' for path parameter 'p1'"
 
-    request = MagicMock(path_params={'p1': 1}, query={'q1': '4'}, headers={})
+    request = MagicMock(path_params={"p1": 1}, query={"q1": "4"}, headers={})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
-    assert exc.value.detail.startswith('4 is greater than the maximum of 3')
-    request = MagicMock(path_params={'p1': 1}, query={'q1': '3'}, headers={}, cookies={})
-    assert handler(request) == 'OK'
+    assert exc.value.detail.startswith("4 is greater than the maximum of 3")
+    request = MagicMock(path_params={"p1": 1}, query={"q1": "3"}, headers={}, cookies={})
+    assert handler(request) == "OK"
 
-    request = MagicMock(path_params={'p1': 1}, query={'a1': ['1', '2']}, headers={}, cookies={})
+    request = MagicMock(path_params={"p1": 1}, query={"a1": ["1", "2"]}, headers={}, cookies={})
     assert handler(request) == "OK"
-    request = MagicMock(path_params={'p1': 1}, query={'a1': ['1', 'a']}, headers={})
+    request = MagicMock(path_params={"p1": 1}, query={"a1": ["1", "a"]}, headers={})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail.startswith("'a' is not of type 'integer'")
-    request = MagicMock(path_params={'p1': '123'}, query={}, headers={}, cookies={'c1': 'b'})
-    assert handler(request) == 'OK'
+    request = MagicMock(path_params={"p1": "123"}, query={}, headers={}, cookies={"c1": "b"})
+    assert handler(request) == "OK"
 
-    request = MagicMock(path_params={'p1': '123'}, query={}, headers={}, cookies={'c1': 'x'})
+    request = MagicMock(path_params={"p1": "123"}, query={}, headers={}, cookies={"c1": "x"})
     with pytest.raises(BadRequestProblem) as exc:
         assert handler(request)
     assert exc.value.detail.startswith("'x' is not one of ['a', 'b']")
-    request = MagicMock(path_params={'p1': 1}, query={'a1': ['1', '-1']}, headers={})
+    request = MagicMock(path_params={"p1": 1}, query={"a1": ["1", "-1"]}, headers={})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail.startswith("-1 is less than the minimum of 0")
-    request = MagicMock(path_params={'p1': 1}, query={'a1': ['1']}, headers={})
+    request = MagicMock(path_params={"p1": 1}, query={"a1": ["1"]}, headers={})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail.startswith("[1] is too short")
-    request = MagicMock(path_params={'p1': 1}, query={'a1': ['1', '2', '3', '4']}, headers={})
+    request = MagicMock(path_params={"p1": 1}, query={"a1": ["1", "2", "3", "4"]}, headers={})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail.startswith("[1, 2, 3, 4] is too long")
 
-    request = MagicMock(path_params={'p1': '123'}, query={}, headers={'h1': 'a'}, cookies={})
-    assert handler(request) == 'OK'
+    request = MagicMock(path_params={"p1": "123"}, query={}, headers={"h1": "a"}, cookies={})
+    assert handler(request) == "OK"
 
-    request = MagicMock(path_params={'p1': '123'}, query={}, headers={'h1': 'x'})
+    request = MagicMock(path_params={"p1": "123"}, query={}, headers={"h1": "x"})
     with pytest.raises(BadRequestProblem) as exc:
         handler(request)
     assert exc.value.detail.startswith("'x' is not one of ['a', 'b']")