Search Options

Results per page
Sort
Preferred Languages
Advance

Results 341 - 350 of 1,036 for AssertJ (0.07 sec)

  1. tests/test_tutorial/test_header_params/test_tutorial001_an.py

    )
    def test(path, headers, expected_status, expected_response):
        response = client.get(path, headers=headers)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  2. tests/test_computed_fields.py

    def test_get(client: TestClient, path: str):
        response = client.get(path)
        assert response.status_code == 200, response.text
        assert response.json() == {"width": 3, "length": 4, "area": 12}
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_first_steps/test_tutorial001.py

        ],
    )
    def test_get_path(path, expected_status, expected_response):
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  4. okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.curl
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import assertk.assertions.startsWith
    import java.io.IOException
    import kotlin.test.Test
    import okhttp3.RequestBody
    import okio.Buffer
    
    class MainTest {
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/WebPlatformUrlTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import okhttp3.HttpUrl.Companion.defaultPort
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
    import okio.buffer
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. tests/test_no_swagger_ui_redirect.py

        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "swagger-ui-dist" in response.text
        print(client.base_url)
        assert "oauth2RedirectUrl" not in response.text
    
    
    def test_swagger_ui_no_oauth2_redirect():
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 404, response.text
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Apr 08 04:37:38 UTC 2020
    - 786 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_response_model/test_tutorial005_py310.py

        response = client.get("/items/bar/name")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Bar", "description": "The Bar fighters"}
    
    
    @needs_py310
    def test_read_item_public_data(client: TestClient):
        response = client.get("/items/bar/public")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "Bar",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008b_an_py39.py

    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found"}
    
    
    @needs_py39
    def test_owner_error(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 918 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_headers/test_tutorial002.py

    from docs_src.response_headers.tutorial002 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/headers-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jul 09 18:06:12 UTC 2020
    - 378 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_updates/test_tutorial001.py

        )
        assert response.json() == {
            "name": "Barz",
            "description": None,
            "price": 3,
            "tax": 10.5,
            "tags": [],
        }
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 11.8K bytes
    - Viewed (0)
Back to top