Search Options

Results per page
Sort
Preferred Languages
Advance

Results 321 - 330 of 1,118 for asset1 (0.09 sec)

  1. 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)
  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_filter_pydantic_sub_model_pv2.py

        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    def test_filter_sub_model(client: TestClient):
        response = client.get("/model/modelA")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "name": "modelA",
            "description": "model-a-desc",
            "foo": {"username": "test-user"},
        }
    
    
    @needs_pydanticv2
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  4. fastapi/dependencies/utils.py

            # Import an attribute that can be mocked/deleted in testing
            assert __version__ > "0.0.12"
        except (ImportError, AssertionError):
            try:
                # __version__ is available in both multiparts, and can be mocked
                from multipart import __version__  # type: ignore[no-redef,import-untyped]
    
                assert __version__
                try:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_custom_response/test_tutorial006.py

    
    def test_get():
        response = client.get("/typer", follow_redirects=False)
        assert response.status_code == 307, response.text
        assert response.headers["location"] == "https://typer.tiangolo.com"
    
    
    def test_openapi_schema():
        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: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  6. tests/test_openapi_separate_input_output_schemas.py

        response = client.post("/items/", json={"name": "Plumbus"})
        response2 = client_no.post("/items/", json={"name": "Plumbus"})
        assert response.status_code == response2.status_code == 200, response.text
        assert (
            response.json()
            == response2.json()
            == {"name": "Plumbus", "description": None, "sub": None}
        )
    
    
    def test_create_item_with_sub():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:44:57 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  7. 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)
  8. tests/test_repeated_dependency_schema.py

        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == schema
        assert (
            len(actual_schema["paths"]["/"]["get"]["parameters"]) == 1
        )  # primary goal of this test
    
    
    def test_response():
        response = client.get("/", headers={"someheader": "hello"})
        assert response.status_code == status.HTTP_200_OK
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py39.py

        response = client.put("/items/foo", json={"name": "Wrestlers"})
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    @needs_py39
    def test_create(client: TestClient):
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 737 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_handling_errors/test_tutorial002.py

        response = client.get("/items-header/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found_header():
        response = client.get("/items-header/bar")
        assert response.status_code == 404, response.text
        assert response.headers.get("x-error") == "There goes my error"
        assert response.json() == {"detail": "Item not found"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.3K bytes
    - Viewed (0)
Back to top