Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for test_post_form_no_body (0.31 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001_02_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_py310 import app
    
        client = TestClient(app)
        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
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial001_02.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_02 import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "No file sent"}
    
    
    def test_post_uploadfile_no_body():
        response = client.post("/uploadfile/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_an_py310 import app
    
        client = TestClient(app)
        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
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial001_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_files/test_tutorial002_an_py39.py

        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial002_py39.py

    file_required = {
        "detail": [
            {
                "loc": ["body", "files"],
                "msg": "field required",
                "type": "value_error.missing",
            }
        ]
    }
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial002_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial002_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    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_py39
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial001_02_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_02_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "No file sent"}
    
    
    def test_post_uploadfile_no_body():
        response = client.post("/uploadfile/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8.2K bytes
    - Viewed (0)
Back to top