Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 1,098 for assertIs (0.09 sec)

  1. tests/test_tutorial/test_request_form_models/test_tutorial002.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    @needs_pydanticv2
    def test_post_body_extra_form(client: TestClient):
        response = client.post(
            "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"}
        )
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.brotli
    
    import assertk.assertThat
    import assertk.assertions.contains
    import assertk.assertions.hasMessage
    import assertk.assertions.isEmpty
    import assertk.assertions.isEqualTo
    import java.io.IOException
    import kotlin.test.assertFailsWith
    import okhttp3.MediaType.Companion.toMediaType
    import okhttp3.Protocol
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial001.py

        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
        response = client.get("/items", headers={"Authorization": "Bearer testtoken"})
        assert response.status_code == 200, response.text
        assert response.json() == {"token": "testtoken"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_cors/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World"}
        assert (
            response.headers["access-control-allow-origin"]
            == "https://localhost.tiangolo.com"
        )
    
        # Test non-CORS response
        response = client.get("/")
        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
    - 1.2K bytes
    - Viewed (0)
  5. mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionMultipleInstancesTest.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package mockwebserver3.junit5.internal
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isNotEqualTo
    import assertk.assertions.isTrue
    import mockwebserver3.MockWebServer
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.BeforeEach
    import org.junit.jupiter.api.Test
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_sql_databases/test_tutorial001.py

            assert response.status_code == 200, response.text
            assert response.json() == snapshot({"ok": True})
    
            response = client.get(f"/heroes/{hero_id}")
            assert response.status_code == 404, response.text
    
            response = client.delete(f"/heroes/{hero_id}")
            assert response.status_code == 404, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert "/static/swagger-ui-bundle.js" in response.text
        assert "/static/swagger-ui.css" in response.text
    
    
    def test_swagger_ui_oauth2_redirect_html(client: TestClient):
        response = client.get("/docs/oauth2-redirect")
        assert response.status_code == 200, response.text
        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 19 19:54:04 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_security_oauth2.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Bearer footokenbar"}
    
    
    def test_security_oauth2_password_other_header():
        response = client.get("/users/me", headers={"Authorization": "Other footokenbar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Other footokenbar"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_optional_description.py

        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Bearer footokenbar"}
    
    
    def test_security_oauth2_password_other_header():
        response = client.get("/users/me", headers={"Authorization": "Other footokenbar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"username": "Other footokenbar"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  10. tests/test_infer_param_optionality.py

        response = client.get("/users")
        assert response.status_code == 200, response.text
        assert response.json() == [{"user_id": "u1"}, {"user_id": "u2"}]
    
    
    def test_get_user():
        """Check that /users/{user_id} returns expected data"""
        response = client.get("/users/abc123")
        assert response.status_code == 200, response.text
        assert response.json() == {"user_id": "abc123"}
    
    
    def test_get_items_1():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.3K bytes
    - Viewed (0)
Back to top