Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 5,930 for text (0.23 sec)

  1. okhttp/src/test/java/okhttp3/MediaTypeTest.kt

        assertInvalid("text", "No subtype found for: \"text\"")
        assertInvalid("text/", "No subtype found for: \"text/\"")
        assertInvalid("te<t/plain", "No subtype found for: \"te<t/plain\"")
        assertInvalid(" text/plain", "No subtype found for: \" text/plain\"")
        assertInvalid("te xt/plain", "No subtype found for: \"te xt/plain\"")
        assertInvalid("text /plain", "No subtype found for: \"text /plain\"")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_sub_applications/test_tutorial001.py

            }
        },
        "servers": [{"url": "/subapi"}],
    }
    
    
    def test_openapi_schema_main():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == openapi_schema_main
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Hello World from main app"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial008c_an.py

        return client
    
    
    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, there's only a plumbus here"}
    
    
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_custom_response/test_tutorial005.py

    from docs_src.custom_response.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert response.text == "Hello World"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 980 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_security/test_tutorial006.py

        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == "Basic"
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial001.py

                assert data == f"Message text was: {message}"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 09:08:19 GMT 2020
    - 822 bytes
    - Viewed (0)
  7. src/cmd/asm/internal/asm/pseudo_test.go

    	}
    
    	nonRuntimeTests := []errtest{
    		{"TEXT", "", "expect two or three operands for TEXT"},
    		{"TEXT", "%", "expect two or three operands for TEXT"},
    		{"TEXT", "1, 1", "TEXT symbol \"<erroneous symbol>\" must be a symbol(SB)"},
    		{"TEXT", "$\"foo\", 0, $1", "TEXT symbol \"<erroneous symbol>\" must be a symbol(SB)"},
    		{"TEXT", "$0É:0, 0, $1", "expected end of operand, found É"}, // Issue #12467.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005_py310.py

        )
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py310
    def test_login_incorrect_username(client: TestClient):
        response = client.post("/token", data={"username": "foo", "password": "secret"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_advanced_middleware/test_tutorial002.py

    from docs_src.advanced_middleware.tutorial002 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="http://example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://subdomain.example.com")
        response = client.get("/")
        assert response.status_code == 200, response.text
        client = TestClient(app, base_url="http://invalidhost")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 570 bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

      @Test
      fun unicodeByteString() {
        val text = "eile oli oliiviõli"
        val body = text.toResponseBody()
        assertThat(body.byteString()).isEqualTo(text.encodeUtf8())
      }
    
      @Test
      fun unicodeByteStringWithCharset() {
        val text = "eile oli oliiviõli".encodeUtf8()
        val body = text.toResponseBody("text/plain; charset=EBCDIC".toMediaType())
        assertThat(body.byteString()).isEqualTo(text)
      }
    
      @Test
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4K bytes
    - Viewed (0)
Back to top