Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for 404 (0.14 sec)

  1. tests/test_tutorial/test_bigger_applications/test_main_an.py

    
    def test_items_bar_token_jessica(client: TestClient):
        response = client.get(
            "/items/bar?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 404
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_items_plumbus_with_no_token(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

    @needs_py39
    def test_items_bar_token_jessica(client: TestClient):
        response = client.get(
            "/items/bar?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 404
        assert response.json() == {"detail": "Item not found"}
    
    
    @needs_py39
    def test_items_plumbus_with_no_token(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  3. tests/test_application.py

    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/api_route", 200, {"message": "Hello World"}),
            ("/non_decorated_route", 200, {"message": "Hello World"}),
            ("/nonexistent", 404, {"detail": "Not Found"}),
        ],
    )
    def test_get_path(path, expected_status, expected_response):
        response = client.get(path)
        assert response.status_code == expected_status
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_bigger_applications/test_main.py

    
    def test_items_bar_token_jessica(client: TestClient):
        response = client.get(
            "/items/bar?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 404
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_items_plumbus_with_no_token(client: TestClient):
        response = client.get(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  5. tests/test_path.py

        assert response.status_code == 200, response.text
        assert response.json() == "Hello World"
    
    
    def test_nonexistent():
        response = client.get("/nonexistent")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Not Found"}
    
    
    def test_path_foobar():
        response = client.get("/path/foobar")
        assert response.status_code == 200
        assert response.json() == "foobar"
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
Back to top