@@ -32,30 +32,27 @@ def project_config():
3232 project_config .integrate_server_config (server_config )
3333 return project_config
3434
35+
3536def test (project_config : ProjectConfig ):
36- client = TestClient (
37- create_app (
38- project_config = project_config
39- )
40- )
37+ client = TestClient (create_app (project_config = project_config ))
4138
4239 path_to_index = os .path .join (PATH_TO_OUTPUT_FOLDER , "html" , "index.html" )
43- path_to_turbo = os .path .join (PATH_TO_OUTPUT_FOLDER , "html" , "_static" , "turbo.min.js" )
40+ path_to_turbo = os .path .join (
41+ PATH_TO_OUTPUT_FOLDER , "html" , "_static" , "turbo.min.js"
42+ )
4443
4544 #
4645 # Test getting the index.html.
4746 #
4847 response = client .get ("/" )
4948 assert response .status_code == 200
5049
51- response = client .get ("/" , headers = {
52- "if-none-match" : get_etag (path_to_index )
53- } )
50+ response = client .get (
51+ "/" , headers = { " if-none-match" : get_etag (path_to_index )}
52+ )
5453 assert response .status_code == 304
5554
56- response = client .get ("/" , headers = {
57- "if-none-match" : "INVALID_ETAG"
58- })
55+ response = client .get ("/" , headers = {"if-none-match" : "INVALID_ETAG" })
5956 assert response .status_code == 200
6057
6158 #
@@ -64,12 +61,13 @@ def test(project_config: ProjectConfig):
6461 response = client .get ("/_static/turbo.min.js" )
6562 assert response .status_code == 200
6663
67- response = client .get ("/_static/turbo.min.js" , headers = {
68- "if-none-match" : get_etag (path_to_turbo )
69- })
64+ response = client .get (
65+ "/_static/turbo.min.js" ,
66+ headers = {"if-none-match" : get_etag (path_to_turbo )},
67+ )
7068 assert response .status_code == 304
7169
72- response = client .get ("/_static/turbo.min.js" , headers = {
73- "if-none-match" : "INVALID_ETAG"
74- } )
70+ response = client .get (
71+ "/_static/turbo.min.js" , headers = { " if-none-match" : "INVALID_ETAG" }
72+ )
7573 assert response .status_code == 200
0 commit comments