Search Options

Results per page
Sort
Preferred Languages
Advance

Results 271 - 280 of 1,036 for AssertJ (0.05 sec)

  1. tests/test_tutorial/test_body_fields/test_tutorial001_an.py

        client = TestClient(app)
        return client
    
    
    def test_items_5(client: TestClient):
        response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "item": {"name": "Foo", "price": 3.0, "description": None, "tax": None},
        }
    
    
    def test_items_6(client: TestClient):
        response = client.put(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py

        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_items_5(client: TestClient):
        response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "item": {"name": "Foo", "price": 3.0, "description": None, "tax": None},
        }
    
    
    @needs_py39
    def test_items_6(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_response/test_tutorial004.py

        </html>
        """
    
    
    def test_get_custom_response():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.text == html_contents
    
    
    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 Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    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
    - 1.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

     * limitations under the License.
     */
    package okhttp3.internal.concurrent
    
    import assertk.assertThat
    import assertk.assertions.isCloseTo
    import assertk.assertions.isEmpty
    import assertk.assertions.isEqualTo
    import assertk.assertions.isTrue
    import java.lang.Thread.UncaughtExceptionHandler
    import java.util.concurrent.LinkedBlockingDeque
    import java.util.concurrent.ThreadFactory
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.containsExactly
    import assertk.assertions.isEqualTo
    import assertk.assertions.isInstanceOf
    import assertk.assertions.isNotInstanceOf
    import assertk.assertions.isNotNull
    import assertk.assertions.isNull
    import assertk.assertions.isSameAs
    import java.io.IOException
    import java.net.CookieManager
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/JSSETest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.containsExactly
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotEmpty
    import javax.net.ssl.SSLSocket
    import javax.net.ssl.SSLSocketFactory
    import mockwebserver3.MockResponse
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params_str_validations/test_tutorial011_an_py39.py

        url = "/items/?q=foo&q=bar"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    @needs_py39
    def test_query_no_values(client: TestClient):
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": None}
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_additional_responses/test_tutorial001.py

    
    def test_path_operation():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    def test_path_operation_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
        assert response.json() == {"message": "Item not found"}
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_body_nested_models/test_tutorial009.py

        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_post_invalid_body(client: TestClient):
        data = {"foo": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top