CodeBench: promptit kokonaan englanniksi — poistettu suomenkieliset esimerkit
This commit is contained in:
@@ -38,14 +38,14 @@ class Post(Base):
|
||||
Example FK test patterns:
|
||||
```
|
||||
def test_create_post():
|
||||
author = client.post("/authors/", json={"name": "Kirjailija"}).json()
|
||||
response = client.post("/posts/", json={"title": "Artikkeli", "author_id": author["id"]})
|
||||
author = client.post("/authors/", json={"name": "Jane Austen"}).json()
|
||||
response = client.post("/posts/", json={"title": "First Post", "author_id": author["id"]})
|
||||
assert response.status_code == 201
|
||||
|
||||
def test_update_post():
|
||||
author = client.post("/authors/", json={"name": "Päivittäjä"}).json()
|
||||
created = client.post("/posts/", json={"title": "Vanha", "author_id": author["id"]}).json()
|
||||
response = client.put(f"/posts/{created['id']}", json={"title": "Uusi", "author_id": author["id"]})
|
||||
author = client.post("/authors/", json={"name": "Mark Twain"}).json()
|
||||
created = client.post("/posts/", json={"title": "Old Title", "author_id": author["id"]}).json()
|
||||
response = client.put(f"/posts/{created['id']}", json={"title": "New Title", "author_id": author["id"]})
|
||||
assert response.status_code == 201
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user