From 3bb8eda03cecadd545033af457f3df95564b65a0 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Thu, 18 Jan 2024 23:51:18 -0500 Subject: [PATCH] Address pytest warning --- tests/test_core.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_core.py b/tests/test_core.py index 74156270..854e6c02 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1077,7 +1077,7 @@ def test_path_resolve_refs_in_request_body_schema(self, spec): class TestPlugins: @staticmethod - def test_plugin_factory(return_none=False): + def make_test_plugin(return_none=False): class TestPlugin(BasePlugin): """Test Plugin @@ -1125,7 +1125,7 @@ def test_plugin_schema_helper_is_used(self, openapi_version, return_none): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(return_none),), + plugins=(self.make_test_plugin(return_none),), ) schema = {"dummy": "dummy"} spec.components.schema("Pet", schema) @@ -1144,7 +1144,7 @@ def test_plugin_parameter_helper_is_used(self, openapi_version, return_none): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(return_none),), + plugins=(self.make_test_plugin(return_none),), ) parameter = {"dummy": "dummy"} spec.components.parameter("Pet", "body", parameter) @@ -1167,7 +1167,7 @@ def test_plugin_response_helper_is_used(self, openapi_version, return_none): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(return_none),), + plugins=(self.make_test_plugin(return_none),), ) response = {"dummy": "dummy"} spec.components.response("Pet", response) @@ -1186,7 +1186,7 @@ def test_plugin_header_helper_is_used(self, openapi_version, return_none): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(return_none),), + plugins=(self.make_test_plugin(return_none),), ) header = {"dummy": "dummy"} spec.components.header("Pet", header) @@ -1207,7 +1207,7 @@ def test_plugin_path_helper_is_used(self, openapi_version, return_none): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(return_none),), + plugins=(self.make_test_plugin(return_none),), ) spec.path("/path_1") paths = get_paths(spec) @@ -1226,7 +1226,7 @@ def test_plugin_operation_helper_is_used(self, openapi_version): title="Swagger Petstore", version="1.0.0", openapi_version=openapi_version, - plugins=(self.test_plugin_factory(),), + plugins=(self.make_test_plugin(),), ) spec.path("/path_2", operations={"post": {"responses": {"200": {}}}}) paths = get_paths(spec)