소스 검색

fixed explanation

Rodja Trappe 2 년 전
부모
커밋
368df3e1c6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      tests/conftest.py

+ 2 - 2
tests/conftest.py

@@ -37,10 +37,10 @@ def selenium(selenium: webdriver.Chrome) -> webdriver.Chrome:
 
 @pytest.fixture(autouse=True)
 def reset_globals() -> Generator[None, None, None]:
-    # we need to remove
-    [globals.app.routes.remove(r) for r in globals.app.routes if 'favicon' in r.path]
     for path in {'/'}.union(globals.page_routes.values()):
         globals.app.remove_route(path)
+    # NOTE favicon routes must be removed seperately because they are not "pages"
+    [globals.app.routes.remove(r) for r in globals.app.routes if 'favicon' in r.path]
     importlib.reload(globals)
     globals.index_client = Client(page('/'), shared=True).__enter__()
     globals.app.get('/')(globals.index_client.build_response)