- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 1,098 for assertIs (0.08 sec)
-
tests/test_tutorial/test_handling_errors/test_tutorial001.py
def test_get_item(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text assert response.headers.get("x-error") is None assert response.json() == {"detail": "Item not found"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial001.py
assert response.status_code == 200 assert response.json() == { "host": "testserver", "save_data": True, "if_modified_since": None, "traceparent": None, "x_tag": [], } def test_header_param_model_invalid(client: TestClient): response = client.get("/items/") assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py
response = client.put("/items/5?q=bar", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5, "q": "bar"} @needs_py39 def test_post_no_body(client: TestClient): response = client.put("/items/5", json=None) assert response.status_code == 200 assert response.json() == {"item_id": 5} @needs_py39 def test_post_id_foo(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0) -
tests/test_datastructures.py
stream = io.BytesIO(b"data") file = UploadFile(filename="file", file=stream, size=4) assert await file.read() == b"data" assert file.size == 4 await file.write(b" and more data!") assert await file.read() == b"" assert file.size == 19 await file.seek(0) assert await file.read() == b"data and more data!"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_basic_realm.py
assert response.status_code == 200, response.text assert response.json() == {"username": "john", "password": "secret"} def test_security_http_basic_no_credentials(): response = client.get("/users/me") assert response.json() == {"detail": "Not authenticated"} assert response.status_code == 401, response.text assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
assert response.status_code == 400, response.text assert response.json() == {"detail": "Incorrect username or password"} def test_no_token(): response = client.get("/users/me") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py
response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == ["Portal gun", "Plumbus"] def test_get_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == ["Rick", "Morty"] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.7K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.sse.internal import assertk.assertThat import assertk.assertions.isEmpty import assertk.assertions.isEqualTo import assertk.assertions.isNull import java.util.concurrent.LinkedBlockingDeque import java.util.concurrent.TimeUnit import okhttp3.Response import okhttp3.internal.platform.Platform
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.1K bytes - Viewed (0) -
tests/test_local_docs.py
html = get_swagger_ui_html(openapi_url="/docs", title="title") body_content = html.body.decode() assert swagger_js_url in body_content assert swagger_css_url in body_content assert swagger_favicon_url in body_content def test_strings_in_custom_swagger(): swagger_js_url = "swagger_fake_file.js" swagger_css_url = "swagger_fake_file.css"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Dec 20 18:50:00 UTC 2020 - 2.4K bytes - Viewed (0) -
tests/test_dependency_duplicates.py
json={"item": {"data": "myitem"}, "item2": {"data": "myitem2"}}, ) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem2"}] def test_duplicates(): response = client.post("/with-duplicates", json={"data": "myitem"}) assert response.status_code == 200, response.text assert response.json() == [{"data": "myitem"}, {"data": "myitem"}]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.4K bytes - Viewed (0)