Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 1,075 for Upsert (0.04 sec)

  1. tests/test_tutorial/test_custom_response/test_tutorial005.py

    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert response.text == "Hello World"
    
    
    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": "FastAPI", "version": "0.1.0"},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 985 bytes
    - Viewed (0)
  2. 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 Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8K bytes
    - Viewed (0)
  3. tests/test_response_model_default_factory.py

        assert response.status_code == 200, response.text
    
        assert response.json()["code"] == 200
        assert response.json()["message"] == "Successful operation."
    
    
    def test_response_model_has_default_factory_return_model():
        response = client.get("/response_model_has_default_factory_return_model")
    
        assert response.status_code == 200, response.text
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 18:51:40 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_security_http_base.py

        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 == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Other"
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 24 19:03:06 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_query_param_models/test_tutorial002.py

            },
        )
        assert response.status_code == 200
        assert response.json() == {
            "limit": 10,
            "offset": 5,
            "order_by": "updated_at",
            "tags": ["tag1", "tag2"],
        }
    
    
    def test_query_param_model_defaults(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200
        assert response.json() == {
            "limit": 100,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          future.get();
          Assert.fail("This call was supposed to throw an ExecutionException");
        } catch (ExecutionException expected) {
          Assert.assertSame(expectedCause, expected.getCause());
        }
      }
    
      public void assertTimeout() throws Exception {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri May 12 18:12:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_response/test_tutorial006.py

    
    def test_get():
        response = client.get("/typer", follow_redirects=False)
        assert response.status_code == 307, response.text
        assert response.headers["location"] == "https://typer.tiangolo.com"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_nested_models/test_tutorial006.py

                "tags": ["foo", "bar", "foo"],
                "images": [
                    {"url": "http://example.com/image.png", "name": "example image"}
                ],
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "item_id": 123,
            "item": {
                "name": "Foo",
                "description": "A very nice Item",
                "price": 35.4,
                "tax": 3.2,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_events/test_tutorial003.py

        ml_models,
    )
    
    
    def test_events():
        assert not ml_models, "ml_models should be empty"
        with TestClient(app) as client:
            assert ml_models["answer_to_everything"] == fake_answer_to_everything_ml_model
            response = client.get("/predict", params={"x": 2})
            assert response.status_code == 200, response.text
            assert response.json() == {"result": 84.0}
        assert not ml_models, "ml_models should be empty"
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  10. tests/test_request_params/test_body/test_optional_str.py

        client = TestClient(app)
        response = client.post("/optional-str")
        assert response.status_code == 200, response.text
        assert response.json() == {"p": None}
    
    
    def test_model_optional_str_missing():
        client = TestClient(app)
        response = client.post("/model-optional-str")
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11.6K bytes
    - Viewed (0)
Back to top