Skip to content

Commit

Permalink
📝 Update examples for tests to replace "inexistent" for "nonexistent" (
Browse files Browse the repository at this point in the history
  • Loading branch information
Homesteady committed Mar 13, 2024
1 parent 72e07c4 commit 4782887
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs_src/app_testing/app_b/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion docs_src/app_testing/app_b_an/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion docs_src/app_testing/app_b_an_py310/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion docs_src/app_testing/app_b_an_py39/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion docs_src/app_testing/app_b_py310/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_security/test_tutorial005.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_security/test_tutorial005_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_security/test_tutorial005_py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_testing/test_main_b.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_testing/test_main_b_an.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_testing/test_main_b_an_py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_testing/test_main_b_an_py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion tests/test_tutorial/test_testing/test_main_b_py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 4782887

Please sign in to comment.