- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 1,077 for assertOp (0.11 sec)
-
tests/test_tutorial/test_extending_openapi/test_tutorial001.py
client = TestClient(app) def test(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": { "title": "Custom title",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.5K bytes - Viewed (0) -
tests/test_tutorial/test_generate_clients/test_tutorial003.py
response = client.post("/items/", json={"name": "Foo", "price": 5}) assert response.status_code == 200, response.text assert response.json() == {"message": "Item received"} def test_post_users(): response = client.post( "/users/", json={"username": "Foo", "email": "******@****.***"} ) assert response.status_code == 200, response.text assert response.json() == {"message": "User received"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 7.1K bytes - Viewed (0) -
tests/test_security_api_key_header_description.py
def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"}) assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial012.py
response = client.get("/items/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_get_invalid_one_users(): response = client.get("/users/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 8.4K bytes - Viewed (0) -
tests/test_query.py
assert response.status_code == 200 assert response.json() == "foo bar" def test_query_param_query_50(): response = client.get("/query/param?query=50") assert response.status_code == 200 assert response.json() == "foo bar 50" def test_query_param_required(): response = client.get("/query/param-required") assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 11.4K bytes - Viewed (0) -
tests/test_security_api_key_query.py
def test_security_api_key(): response = client.get("/users/me?key=secret") assert response.status_code == 200, response.text assert response.json() == {"username": "secret"} def test_security_api_key_no_key(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.8K bytes - Viewed (0) -
tests/test_security_http_base_description.py
response = client.get("/users/me", headers={"Authorization": "Other foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Other", "credentials": "foobar"} def test_security_http_base_no_credentials(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"} def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py
data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: bar" message = "Message two" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: some-token" data = websocket.receive_text()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/AndroidAsyncDnsTest.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.android import assertk.assertFailure import assertk.assertions.hasMessage import assertk.assertions.isInstanceOf import java.net.UnknownHostException import okhttp3.AsyncDns import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 22 20:07:09 UTC 2024 - 1.6K bytes - Viewed (0) -
tests/test_params_repr.py
def test_body_repr_number(): assert repr(Body(1)) == "Body(1)" def test_body_repr_list(): assert repr(Body([])) == "Body([])" def test_depends_repr(): assert repr(Depends()) == "Depends(NoneType)" assert repr(Depends(get_user)) == "Depends(get_user)" assert repr(Depends(use_cache=False)) == "Depends(NoneType, use_cache=False)" assert (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 3.3K bytes - Viewed (0)