- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 1,708 for Post (0.09 sec)
-
tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py
return client @needs_py310 def test_post_form_no_body(client: TestClient): response = client.post("/files/") assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} @needs_py310 def test_post_uploadfile_no_body(client: TestClient): response = client.post("/uploadfile/") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 8.5K bytes - Viewed (0) -
tests/test_tutorial/test_generate_clients/test_tutorial003.py
client = TestClient(app) def test_post_items(): 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": "******@****.***"} )
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_required_noneable.py
def test_required_nonable_body_embed_no_content(): response = client.post("/body-embed") assert response.status_code == 422 def test_required_nonable_body_embed_invalid(): response = client.post("/body-embed", json={"invalid": "invalid"}) assert response.status_code == 422 def test_required_noneable_body_embed_value(): response = client.post("/body-embed", json={"b": "foo"}) assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 19:08:31 UTC 2022 - 1.5K bytes - Viewed (0) -
tests/postgres_test.go
} DB.Migrator().DropTable(&Post{}, &Category{}, "post_categories") DB.AutoMigrate(&Post{}, &Category{}) post := Post{ Title: "Hello World", Categories: []*Category{ {Title: "Coding"}, {Title: "Golang"}, }, } if err := DB.Create(&post).Error; err != nil { t.Errorf("Failed, got error: %v", err) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Oct 08 09:16:32 UTC 2022 - 6.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001_an_py39.py
@needs_py39 def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200 assert response.json() == {"username": "Foo", "password": "secret"} @needs_py39 def test_post_body_form_no_password(client: TestClient): response = client.post("/login/", data={"username": "Foo"}) assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 7.5K bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.post("/login") def login(form_data: OAuth2PasswordRequestFormStrict = Depends()): return form_data @app.get("/users/me") def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
tests/test_webhooks_security.py
class Subscription(BaseModel): username: str monthly_fee: float start_date: datetime @app.webhooks.post("new-subscription") def new_subscription( body: Subscription, token: Annotated[str, Security(bearer_scheme)] ): """ When a new user subscribes to your service we'll send you a POST request with this data to the URL that you register for the event `new-subscription` in the dashboard. """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Oct 20 09:00:44 UTC 2023 - 4.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/api/admin/user/ApiAdminUserAction.java
} return asJson(new ApiResult.ApiUpdateResponse().id(entity.getId()).created(true).status(ApiResult.Status.OK).result()); } // POST /api/admin/user/setting @Execute public JsonResponse<ApiResult> post$setting(final EditBody body) { validateApi(body, messages -> {}); validateAttributes(body.attributes, this::throwValidationErrorApi); body.crudMode = CrudMode.EDIT;
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 5.8K bytes - Viewed (0) -
docs_src/app_testing/app_b/test_main.py
def test_create_item_bad_token(): response = client.post( "/items/", headers={"X-Token": "hailhydra"}, json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"}, ) assert response.status_code == 400 assert response.json() == {"detail": "Invalid X-Token header"} def test_create_existing_item(): response = client.post( "/items/",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 1.8K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py39/test_main.py
def test_create_item_bad_token(): response = client.post( "/items/", headers={"X-Token": "hailhydra"}, json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"}, ) assert response.status_code == 400 assert response.json() == {"detail": "Invalid X-Token header"} def test_create_existing_item(): response = client.post( "/items/",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.8K bytes - Viewed (0)