- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 882 for pos3 (0.06 sec)
-
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_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/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) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketExtensions.kt
// Parse each extension. var pos = 0 while (pos < header.length) { val extensionEnd = header.delimiterOffset(',', pos) val extensionTokenEnd = header.delimiterOffset(';', pos, extensionEnd) val extensionToken = header.trimSubstring(pos, extensionTokenEnd) pos = extensionTokenEnd + 1 when {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 8.1K 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) -
docs_src/openapi_callbacks/tutorial001.py
class InvoiceEventReceived(BaseModel): ok: bool invoices_callback_router = APIRouter() @invoices_callback_router.post( "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived ) def invoice_notification(body: InvoiceEvent): pass @app.post("/invoices/", callbacks=invoices_callback_router.routes) def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None): """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1.3K bytes - Viewed (0)