-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
test/**/__snapshots__/**/*.json linguist-generated=true | ||
|
||
* text=auto | ||
*.png -text | ||
*.wav -text | ||
*.wav -text |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from typing import Any | ||
|
||
from fastapi import FastAPI | ||
from syrupy.extensions.json import JSONSnapshotExtension | ||
from syrupy.assertion import SnapshotAssertion | ||
|
||
|
||
def test_OpenAPIの形が変わっていないことを確認( | ||
app: FastAPI, snapshot_json: JSONSnapshotExtension | ||
) -> None: | ||
def test_OpenAPIの形が変わっていないことを確認(app: FastAPI, snapshot_json: SnapshotAssertion) -> None: | ||
# 変更があった場合はREADMEの「スナップショットの更新」の手順で更新可能 | ||
openapi: Any = app.openapi() # snapshot_jsonがmypyに対応していないのでワークアラウンド | ||
assert snapshot_json == openapi |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
""" | ||
プリセットAPIのテスト | ||
""" | ||
|
||
from fastapi.testclient import TestClient | ||
from syrupy.assertion import SnapshotAssertion | ||
|
||
|
||
def test_プリセット一覧を取得できる(client: TestClient, snapshot_json: SnapshotAssertion) -> None: | ||
response = client.get("/presets") | ||
assert response.status_code == 200 | ||
assert snapshot_json == response.json() |