浏览代码

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)