Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 1,833 for Post (0.2 sec)

  1. tests/test_tutorial/test_generate_clients/test_tutorial003.py

    from docs_src.generate_clients.tutorial003 import app
    
    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": "******@****.***"}
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  2. tests/test_union_body.py

        price: int
    
    
    @app.post("/items/")
    def save_union_body(item: Union[OtherItem, Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_post_other_item():
        response = client.post("/items/", json={"price": 100})
        assert response.status_code == 200, response.text
        assert response.json() == {"item": {"price": 100}}
    
    
    def test_post_item():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  3. api/maven-api-core/src/main/java/org/apache/maven/api/plugin/annotations/LifecyclePhase.java

        INTEGRATION_TEST("integration-test"),
        POST_INTEGRATION_TEST("post-integration-test"),
        VERIFY("verify"),
        INSTALL("install"),
        DEPLOY("deploy"),
    
        PRE_CLEAN("pre-clean"),
        CLEAN("clean"),
        POST_CLEAN("post-clean"),
    
        PRE_SITE("pre-site"),
        SITE("site"),
        POST_SITE("post-site"),
        SITE_DEPLOY("site-deploy"),
    
        NONE("");
    
    Java
    - Registered: Sun Apr 07 03:35:11 GMT 2024
    - Last Modified: Thu Mar 23 05:29:39 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  4. tests/test_webhooks_security.py

                "new-subscription": {
                    "post": {
                        "summary": "New Subscription",
                        "description": "When a new user subscribes to your service we'll send you a POST request with this\ndata to the URL that you register for the event `new-subscription` in the dashboard.",
                        "operationId": "new_subscriptionnew_subscription_post",
                        "requestBody": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/eventbus/EventBusTest.java

        bus.register(compCatcher);
    
        // Two additional event types: Object and Comparable<?> (played by Integer)
        Object objEvent = new Object();
        Object compEvent = 6;
    
        bus.post(EVENT);
        bus.post(objEvent);
        bus.post(compEvent);
    
        // Check the StringCatcher...
        List<String> stringEvents = stringCatcher.getEvents();
        assertEquals("Only one String should be delivered.", 1, stringEvents.size());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

        bus.register(compCatcher);
    
        // Two additional event types: Object and Comparable<?> (played by Integer)
        Object objEvent = new Object();
        Object compEvent = 6;
    
        bus.post(EVENT);
        bus.post(objEvent);
        bus.post(compEvent);
    
        // Check the StringCatcher...
        List<String> stringEvents = stringCatcher.getEvents();
        assertEquals("Only one String should be delivered.", 1, stringEvents.size());
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  7. tests/test_multi_body_errors.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        age: condecimal(gt=Decimal(0.0))  # type: ignore
    
    
    @app.post("/items/")
    def save_item_no_body(item: List[Item]):
        return {"item": item}
    
    
    client = TestClient(app)
    
    
    def test_put_correct_body():
        response = client.post("/items/", json=[{"name": "Foo", "age": 5}])
        assert response.status_code == 200, response.text
        assert response.json() == {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  8. tests/test_read_with_orm_mode.py

        app = FastAPI()
    
        @app.post("/people/", response_model=PersonRead)
        def create_person(person: PersonCreate) -> Any:
            db_person = Person.model_validate(person)
            return db_person
    
        client = TestClient(app)
    
        person_data = {"name": "Dive", "lastname": "Wilson"}
        response = client.post("/people/", json=person_data)
        data = response.json()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_handling_errors/test_tutorial005.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_post_validation_error():
        response = client.post("/items/", json={"title": "towel", "size": "XL"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  10. tests/test_schema_extra_examples.py

        client = TestClient(app)
        response = client.post("/schema_extra/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/example/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/examples/", json={"data": "Foo"})
        assert response.status_code == 200, response.text
        response = client.post("/example_examples/", json={"data": "Foo"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
Back to top