Browse Source

fixed explanation

Rodja Trappe 2 years ago
parent
commit
368df3e1c6
1 changed files with 2 additions and 2 deletions
  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)