Skip to content

Commit cc17623

Browse files
committed
fix
1 parent 0d928e7 commit cc17623

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_api/test_api_sqla_with_includes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,6 +2054,7 @@ def _clear_cache(self):
20542054
SchemaBuilder.object_schemas_cache = {}
20552055
SchemaBuilder.relationship_schema_cache = {}
20562056
SchemaBuilder.base_jsonapi_object_schemas_cache = {}
2057+
RoutersJSONAPI.all_jsonapi_routers = {}
20572058

20582059
def build_app(self, schema) -> FastAPI:
20592060
return build_app_custom(
@@ -2092,6 +2093,7 @@ async def execute_request_and_check_response(
20922093
],
20932094
},
20942095
}
2096+
self._clear_cache()
20952097

20962098
async def execute_request_twice_and_check_response(
20972099
self,
@@ -2102,18 +2104,16 @@ async def execute_request_twice_and_check_response(
21022104
"""
21032105
Makes two requests for check schema inheritance
21042106
"""
2105-
apps = [
2106-
self.build_app(schema),
2107-
self.build_app(self.inherit(schema)),
2108-
]
2107+
app_1 = self.build_app(schema)
2108+
self._clear_cache()
2109+
app_2 = self.build_app(self.inherit(schema))
21092110

2110-
for app in apps:
2111+
for app in [app_1, app_2]:
21112112
await self.execute_request_and_check_response(
21122113
app=app,
21132114
body=body,
21142115
expected_detail=expected_detail,
21152116
)
2116-
self._clear_cache()
21172117

21182118
async def test_field_validator_call(self):
21192119
"""

0 commit comments

Comments
 (0)