File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff 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 """
You can’t perform that action at this time.
0 commit comments