Search Options

Results per page
Sort
Preferred Languages
Advance

Results 381 - 390 of 1,036 for AssertJ (0.04 sec)

  1. tests/test_put_no_body.py

    
    def test_put_no_body():
        response = client.put("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo"}
    
    
    def test_put_no_body_with_body():
        response = client.put("/items/foo", json={"name": "Foo"})
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo"}
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  2. tests/test_security_api_key_cookie_optional.py

        response = client.get("/users/me")
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "secret"}
    
    
    def test_security_api_key_no_key():
        client = TestClient(app)
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  3. tests/test_security_api_key_query_optional.py

    
    def test_security_api_key():
        response = client.get("/users/me?key=secret")
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "secret"}
    
    
    def test_security_api_key_no_key():
        response = client.get("/users/me")
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Create an account first"}
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params_str_validations/test_tutorial014_an_py39.py

        response = client.get("/items?hidden_query=somevalue")
        assert response.status_code == 200, response.text
        assert response.json() == {"hidden_query": "somevalue"}
    
    
    @needs_py310
    def test_no_hidden_query(client: TestClient):
        response = client.get("/items")
        assert response.status_code == 200, response.text
        assert response.json() == {"hidden_query": "Not found"}
    
    
    @needs_py310
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_cookie_params/test_tutorial001_an.py

        client = TestClient(app, cookies=cookies)
        response = client.get(path)
        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        client = TestClient(app)
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  6. tests/test_swagger_ui_init_oauth.py

    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        print(response.text)
        assert "ui.initOAuth" in response.text
        assert '"appName": "The Predendapp"' in response.text
        assert '"clientId": "the-foo-clients"' in response.text
    
    
    def test_response():
        response = client.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Aug 09 10:54:05 UTC 2020
    - 718 bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

     * limitations under the License.
     */
    package okhttp3.internal.ws
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.isEmpty
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNull
    import assertk.assertions.isSameAs
    import java.io.IOException
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.concurrent.TimeUnit
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_additional_responses/test_tutorial004.py

        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_img():
        shutil.copy("./docs/en/docs/img/favicon.png", "./image.png")
        response = client.get("/items/foo?img=1")
        assert response.status_code == 200, response.text
        assert response.headers["Content-Type"] == "image/png"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/tests/RandomAccessFileTest.java

     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    package jcifs.tests;
    
    
    import static org.junit.Assert.assertArrayEquals;
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.fail;
    
    import java.io.DataOutput;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.MalformedURLException;
    import java.net.UnknownHostException;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Jul 01 13:12:10 UTC 2018
    - 11.4K bytes
    - Viewed (0)
  10. tests/test_allow_inf_nan_in_enforcing.py

        assert response.status_code == code, response.text
    
    
    @pytest.mark.parametrize(
        "value,code",
        [
            ("-1", 200),
            ("inf", 422),
            ("-inf", 422),
            ("nan", 422),
            ("0", 200),
            ("342", 200),
        ],
    )
    def test_allow_inf_nan_body(value: str, code: int):
        response = client.post("/", json=value)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 24 19:27:37 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top