Skip to content

Commit c4cf238

Browse files
committed
Merge remote-tracking branch 'upstream/dependabot/pip/ruff-0.9.6' into dependabot/pip/ruff-0.9.6
2 parents e23ea52 + 45f5ef6 commit c4cf238

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ def test_tutorial(clear_sqlmodel):
4949
data = response.json()
5050
assert response.status_code == 200, response.text
5151
assert data["name"] == hero2_data["name"], "The name should not be set to none"
52-
assert data["secret_name"] == "Spider-Youngster", (
53-
"The secret name should be updated"
54-
)
52+
assert (
53+
data["secret_name"] == "Spider-Youngster"
54+
), "The secret name should be updated"
5555

5656
response = client.patch(f"/heroes/{hero3_id}", json={"age": None})
5757
data = response.json()
5858
assert response.status_code == 200, response.text
5959
assert data["name"] == hero3_data["name"]
60-
assert data["age"] is None, (
61-
"A field should be updatable to None, even if that's the default"
62-
)
60+
assert (
61+
data["age"] is None
62+
), "A field should be updatable to None, even if that's the default"
6363

6464
response = client.patch("/heroes/9001", json={"name": "Dragon Cube X"})
6565
assert response.status_code == 404, response.text

tests/test_tutorial/test_fastapi/test_update/test_tutorial001_py310.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ def test_tutorial(clear_sqlmodel):
5252
data = response.json()
5353
assert response.status_code == 200, response.text
5454
assert data["name"] == hero2_data["name"], "The name should not be set to none"
55-
assert data["secret_name"] == "Spider-Youngster", (
56-
"The secret name should be updated"
57-
)
55+
assert (
56+
data["secret_name"] == "Spider-Youngster"
57+
), "The secret name should be updated"
5858

5959
response = client.patch(f"/heroes/{hero3_id}", json={"age": None})
6060
data = response.json()
6161
assert response.status_code == 200, response.text
6262
assert data["name"] == hero3_data["name"]
63-
assert data["age"] is None, (
64-
"A field should be updatable to None, even if that's the default"
65-
)
63+
assert (
64+
data["age"] is None
65+
), "A field should be updatable to None, even if that's the default"
6666

6767
response = client.patch("/heroes/9001", json={"name": "Dragon Cube X"})
6868
assert response.status_code == 404, response.text

tests/test_tutorial/test_fastapi/test_update/test_tutorial001_py39.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ def test_tutorial(clear_sqlmodel):
5252
data = response.json()
5353
assert response.status_code == 200, response.text
5454
assert data["name"] == hero2_data["name"], "The name should not be set to none"
55-
assert data["secret_name"] == "Spider-Youngster", (
56-
"The secret name should be updated"
57-
)
55+
assert (
56+
data["secret_name"] == "Spider-Youngster"
57+
), "The secret name should be updated"
5858

5959
response = client.patch(f"/heroes/{hero3_id}", json={"age": None})
6060
data = response.json()
6161
assert response.status_code == 200, response.text
6262
assert data["name"] == hero3_data["name"]
63-
assert data["age"] is None, (
64-
"A field should be updatable to None, even if that's the default"
65-
)
63+
assert (
64+
data["age"] is None
65+
), "A field should be updatable to None, even if that's the default"
6666

6767
response = client.patch("/heroes/9001", json={"name": "Dragon Cube X"})
6868
assert response.status_code == 404, response.text

tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ def test_tutorial(clear_sqlmodel):
8080
data = response.json()
8181
assert response.status_code == 200, response.text
8282
assert data["name"] == hero2_data["name"], "The name should not be set to none"
83-
assert data["secret_name"] == "Spider-Youngster", (
84-
"The secret name should be updated"
85-
)
83+
assert (
84+
data["secret_name"] == "Spider-Youngster"
85+
), "The secret name should be updated"
8686
assert "password" not in data
8787
assert "hashed_password" not in data
8888
with Session(mod.engine) as session:
@@ -95,9 +95,9 @@ def test_tutorial(clear_sqlmodel):
9595
data = response.json()
9696
assert response.status_code == 200, response.text
9797
assert data["name"] == hero3_data["name"]
98-
assert data["age"] is None, (
99-
"A field should be updatable to None, even if that's the default"
100-
)
98+
assert (
99+
data["age"] is None
100+
), "A field should be updatable to None, even if that's the default"
101101
assert "password" not in data
102102
assert "hashed_password" not in data
103103
with Session(mod.engine) as session:

tests/test_tutorial/test_fastapi/test_update/test_tutorial002_py310.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def test_tutorial(clear_sqlmodel):
8383
data = response.json()
8484
assert response.status_code == 200, response.text
8585
assert data["name"] == hero2_data["name"], "The name should not be set to none"
86-
assert data["secret_name"] == "Spider-Youngster", (
87-
"The secret name should be updated"
88-
)
86+
assert (
87+
data["secret_name"] == "Spider-Youngster"
88+
), "The secret name should be updated"
8989
assert "password" not in data
9090
assert "hashed_password" not in data
9191
with Session(mod.engine) as session:
@@ -98,9 +98,9 @@ def test_tutorial(clear_sqlmodel):
9898
data = response.json()
9999
assert response.status_code == 200, response.text
100100
assert data["name"] == hero3_data["name"]
101-
assert data["age"] is None, (
102-
"A field should be updatable to None, even if that's the default"
103-
)
101+
assert (
102+
data["age"] is None
103+
), "A field should be updatable to None, even if that's the default"
104104
assert "password" not in data
105105
assert "hashed_password" not in data
106106
with Session(mod.engine) as session:

tests/test_tutorial/test_fastapi/test_update/test_tutorial002_py39.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def test_tutorial(clear_sqlmodel):
8383
data = response.json()
8484
assert response.status_code == 200, response.text
8585
assert data["name"] == hero2_data["name"], "The name should not be set to none"
86-
assert data["secret_name"] == "Spider-Youngster", (
87-
"The secret name should be updated"
88-
)
86+
assert (
87+
data["secret_name"] == "Spider-Youngster"
88+
), "The secret name should be updated"
8989
assert "password" not in data
9090
assert "hashed_password" not in data
9191
with Session(mod.engine) as session:
@@ -98,9 +98,9 @@ def test_tutorial(clear_sqlmodel):
9898
data = response.json()
9999
assert response.status_code == 200, response.text
100100
assert data["name"] == hero3_data["name"]
101-
assert data["age"] is None, (
102-
"A field should be updatable to None, even if that's the default"
103-
)
101+
assert (
102+
data["age"] is None
103+
), "A field should be updatable to None, even if that's the default"
104104
assert "password" not in data
105105
assert "hashed_password" not in data
106106
with Session(mod.engine) as session:

0 commit comments

Comments
 (0)