]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update examples for tests to replace "inexistent" for "nonexistent" (#11220)
authorbebop <andy.clapson@gmail.com>
Wed, 13 Mar 2024 19:07:10 +0000 (15:07 -0400)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 19:07:10 +0000 (20:07 +0100)
22 files changed:
docs_src/app_testing/app_b/test_main.py
docs_src/app_testing/app_b_an/test_main.py
docs_src/app_testing/app_b_an_py310/test_main.py
docs_src/app_testing/app_b_an_py39/test_main.py
docs_src/app_testing/app_b_py310/test_main.py
tests/test_tutorial/test_security/test_tutorial005.py
tests/test_tutorial/test_security/test_tutorial005_an.py
tests/test_tutorial/test_security/test_tutorial005_an_py310.py
tests/test_tutorial/test_security/test_tutorial005_an_py39.py
tests/test_tutorial/test_security/test_tutorial005_py310.py
tests/test_tutorial/test_security/test_tutorial005_py39.py
tests/test_tutorial/test_sql_databases/test_sql_databases.py
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware.py
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py39.py
tests/test_tutorial/test_sql_databases/test_sql_databases_py310.py
tests/test_tutorial/test_sql_databases/test_sql_databases_py39.py
tests/test_tutorial/test_testing/test_main_b.py
tests/test_tutorial/test_testing/test_main_b_an.py
tests/test_tutorial/test_testing/test_main_b_an_py310.py
tests/test_tutorial/test_testing/test_main_b_an_py39.py
tests/test_tutorial/test_testing/test_main_b_py310.py

index 4e2b98e237c3abf06e62b41cc3b781aa4acba7ba..4e1c51ecc861d1d6a59c54fb9221272d8e13ee5f 100644 (file)
@@ -21,7 +21,7 @@ def test_read_item_bad_token():
     assert response.json() == {"detail": "Invalid X-Token header"}
 
 
-def test_read_inexistent_item():
+def test_read_nonexistent_item():
     response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
     assert response.status_code == 404
     assert response.json() == {"detail": "Item not found"}
index d186b8ecbacfa431a40af18918037ead306a2c8e..e2eda449d459a1f370bc1c00fa1782a58e3018b7 100644 (file)
@@ -21,7 +21,7 @@ def test_read_item_bad_token():
     assert response.json() == {"detail": "Invalid X-Token header"}
 
 
-def test_read_inexistent_item():
+def test_read_nonexistent_item():
     response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
     assert response.status_code == 404
     assert response.json() == {"detail": "Item not found"}
index d186b8ecbacfa431a40af18918037ead306a2c8e..e2eda449d459a1f370bc1c00fa1782a58e3018b7 100644 (file)
@@ -21,7 +21,7 @@ def test_read_item_bad_token():
     assert response.json() == {"detail": "Invalid X-Token header"}
 
 
-def test_read_inexistent_item():
+def test_read_nonexistent_item():
     response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
     assert response.status_code == 404
     assert response.json() == {"detail": "Item not found"}
index d186b8ecbacfa431a40af18918037ead306a2c8e..e2eda449d459a1f370bc1c00fa1782a58e3018b7 100644 (file)
@@ -21,7 +21,7 @@ def test_read_item_bad_token():
     assert response.json() == {"detail": "Invalid X-Token header"}
 
 
-def test_read_inexistent_item():
+def test_read_nonexistent_item():
     response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
     assert response.status_code == 404
     assert response.json() == {"detail": "Item not found"}
index 4e2b98e237c3abf06e62b41cc3b781aa4acba7ba..4e1c51ecc861d1d6a59c54fb9221272d8e13ee5f 100644 (file)
@@ -21,7 +21,7 @@ def test_read_item_bad_token():
     assert response.json() == {"detail": "Invalid X-Token header"}
 
 
-def test_read_inexistent_item():
+def test_read_nonexistent_item():
     response = client.get("/items/baz", headers={"X-Token": "coneofsilence"})
     assert response.status_code == 404
     assert response.json() == {"detail": "Item not found"}
index c669c306ddb014226c695dd06cb7b7e02c2e9930..2e580dbb3544f3118ea58edd17f6f18e3b414855 100644 (file)
@@ -128,7 +128,7 @@ def test_token_no_scope():
     assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
 
 
-def test_token_inexistent_user():
+def test_token_nonexistent_user():
     response = client.get(
         "/users/me",
         headers={
index aaab04f78fb4efe3842e4ecfa8d3dff6bb1bfa5b..04c7d60bcfc60557d6cfaf019477013002c2ee46 100644 (file)
@@ -128,7 +128,7 @@ def test_token_no_scope():
     assert response.headers["WWW-Authenticate"] == 'Bearer scope="me"'
 
 
-def test_token_inexistent_user():
+def test_token_nonexistent_user():
     response = client.get(
         "/users/me",
         headers={
index 243d0773c266ce0724527d3ba7b32787b045e115..9c7f83ed29a9bd9cdbd7027bf4462a0fcb17823d 100644 (file)
@@ -151,7 +151,7 @@ def test_token_no_scope(client: TestClient):
 
 
 @needs_py310
-def test_token_inexistent_user(client: TestClient):
+def test_token_nonexistent_user(client: TestClient):
     response = client.get(
         "/users/me",
         headers={
index 17a3f9aa2a54820d8b1b4e896cb47954298b136e..04cc1b014e1f4952da1cd50e049d6916b0f1785e 100644 (file)
@@ -151,7 +151,7 @@ def test_token_no_scope(client: TestClient):
 
 
 @needs_py39
-def test_token_inexistent_user(client: TestClient):
+def test_token_nonexistent_user(client: TestClient):
     response = client.get(
         "/users/me",
         headers={
index 06455cd632f0953d68f1759a4daec6b44cda62d8..98c60c1c202f3d1ba82734de7a20c6ceeb75d168 100644 (file)
@@ -151,7 +151,7 @@ def test_token_no_scope(client: TestClient):
 
 
 @needs_py310
-def test_token_inexistent_user(client: TestClient):
+def test_token_nonexistent_user(client: TestClient):
     response = client.get(
         "/users/me",
         headers={
index 9455bfb4ef6b93b70dc81de0a53bc8a4b659f282..cd2157d54dd9109df45d7d677e49e799664ddb96 100644 (file)
@@ -151,7 +151,7 @@ def test_token_no_scope(client: TestClient):
 
 
 @needs_py39
-def test_token_inexistent_user(client: TestClient):
+def test_token_nonexistent_user(client: TestClient):
     response = client.get(
         "/users/me",
         headers={
index 03e74743341b4d9dd31797b09828793f8f016fae..e3e2b36a801ab3d24776e1bf3ddcfd3f60128af8 100644 (file)
@@ -54,7 +54,7 @@ def test_get_user(client):
 
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index a503ef2a6a495425d65832537d08866dd770c9bb..73b97e09d9f8ad545fd8443c7704c68b8f66d4bc 100644 (file)
@@ -50,7 +50,7 @@ def test_get_user(client):
 
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index d54cc65527778a52178402993b1372fdce289387..a078f012a96d1e56a0659b5a9c2f28c79aa96fc1 100644 (file)
@@ -58,7 +58,7 @@ def test_get_user(client):
 @needs_py310
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index 4e43995e638ab086e501788d9c117a87c27a3bc6..a5da07ac6feaf12c6bb1255e42596a41d7569c44 100644 (file)
@@ -58,7 +58,7 @@ def test_get_user(client):
 @needs_py39
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index b89b8b0317b97a9f94daa3d97e41aafdc1620356..5a9106598884c6331359f8c6274df1afe15787d9 100644 (file)
@@ -57,7 +57,7 @@ def test_get_user(client):
 @needs_py310
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index 13351bc810a142fe4c22e1e502208b6ca336cf0b..a354ba90530206103769450d81b7c9d00beae62b 100644 (file)
@@ -57,7 +57,7 @@ def test_get_user(client):
 @needs_py39
 # TODO: pv2 add version with Pydantic v2
 @needs_pydanticv1
-def test_inexistent_user(client):
+def test_nonexistent_user(client):
     response = client.get("/users/999")
     assert response.status_code == 404, response.text
 
index fc1a832f996209c5982a5a4b80bfd3241f4f878c..1e1836f5b362ed2c3a81e92ca96981f5a2ddee2b 100644 (file)
@@ -5,6 +5,6 @@ def test_app():
     test_main.test_create_existing_item()
     test_main.test_create_item()
     test_main.test_create_item_bad_token()
-    test_main.test_read_inexistent_item()
+    test_main.test_read_nonexistent_item()
     test_main.test_read_item()
     test_main.test_read_item_bad_token()
index b64c5f71077856377fc813b6460b28fa9db17379..e53fc32246cae97ec2166e98097a846e78bb7076 100644 (file)
@@ -5,6 +5,6 @@ def test_app():
     test_main.test_create_existing_item()
     test_main.test_create_item()
     test_main.test_create_item_bad_token()
-    test_main.test_read_inexistent_item()
+    test_main.test_read_nonexistent_item()
     test_main.test_read_item()
     test_main.test_read_item_bad_token()
index 194700b6dd0e6a5ac3c78a2bc5277b3451111ca2..c974e5dc1e5206018aa8eabd94456b03fcf61ca0 100644 (file)
@@ -8,6 +8,6 @@ def test_app():
     test_main.test_create_existing_item()
     test_main.test_create_item()
     test_main.test_create_item_bad_token()
-    test_main.test_read_inexistent_item()
+    test_main.test_read_nonexistent_item()
     test_main.test_read_item()
     test_main.test_read_item_bad_token()
index 2f8a13623fceb049d75ab00870d16fe7622b9edf..71f99726c90f43c7514df613640e5d7b19697d59 100644 (file)
@@ -8,6 +8,6 @@ def test_app():
     test_main.test_create_existing_item()
     test_main.test_create_item()
     test_main.test_create_item_bad_token()
-    test_main.test_read_inexistent_item()
+    test_main.test_read_nonexistent_item()
     test_main.test_read_item()
     test_main.test_read_item_bad_token()
index a504ed2346edfb3bb300a8784e31896f99cac1cf..e30cdc073ea36376168c61f6dcbdd6456940eb9e 100644 (file)
@@ -8,6 +8,6 @@ def test_app():
     test_main.test_create_existing_item()
     test_main.test_create_item()
     test_main.test_create_item_bad_token()
-    test_main.test_read_inexistent_item()
+    test_main.test_read_nonexistent_item()
     test_main.test_read_item()
     test_main.test_read_item_bad_token()