Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for empty (0.39 sec)

  1. tests/test_empty_router.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    @router.get("")
    def get_empty():
        return ["OK"]
    
    
    app.include_router(router, prefix="/prefix")
    
    
    client = TestClient(app)
    
    
    def test_use_empty():
        with client:
            response = client.get("/prefix")
            assert response.status_code == 200, response.text
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 22:37:34 GMT 2023
    - 805 bytes
    - Viewed (0)
  2. tests/test_reponse_set_reponse_code_empty.py

    Sebastián Ramírez <******@****.***> 1688149516 +0200
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  3. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

      source_file = re.search(
          r"/(bazel_pip|tensorflow)/.*", f.decode("utf-8")
      ).group(0)
      for testsuite in r:
        testsuite._elem.set("source_file", source_file)
        # Remove empty testcases
        for p in testsuite._elem.xpath(".//testcase"):
          if not len(p):  # pylint: disable=g-explicit-length-test
            testsuite._elem.remove(p)
    Python
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_post_body_empty_list(client: TestClient):
        response = client.put("/items/5", json=[])
        assert response.status_code == 422
        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
    - 9.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_post_body_empty_list(client: TestClient):
        response = client.put("/items/5", json=[])
        assert response.status_code == 422
        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
    - 9.4K bytes
    - Viewed (2)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial003_py310.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    @needs_py310
    def test_post_body_empty_list(client: TestClient):
        response = client.put("/items/5", json=[])
        assert response.status_code == 422
        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
    - 9.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_events/test_tutorial003.py

        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"
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    @needs_py310
    def test_post_body_empty_list(client: TestClient):
        response = client.put("/items/5", json=[])
        assert response.status_code == 422
        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
    - 9.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py39.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    @needs_py39
    def test_post_body_empty_list(client: TestClient):
        response = client.put("/items/5", json=[])
        assert response.status_code == 422
        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
    - 9.5K bytes
    - Viewed (0)
Back to top