Skip to content

Commit

Permalink
Remove example code
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaerial committed Mar 24, 2024
1 parent e2037b1 commit edecc79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 61 deletions.
10 changes: 3 additions & 7 deletions tests/endpoints/test_get_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ def test_get_downloads(uid: str, app_client: TestClient, mock_persisted_download
)


@pytest.mark.skip("Fails in Github Actions for unknown reason")
@pytest.mark.skip(
"Fails in Github Actions for unknown reason due to bug https://github.com/tiangolo/fastapi/discussions/11341"
)
def test_get_downloads_no_cookie(app_client: TestClient):
response = app_client.get("/api/downloads")
assert response.status_code == 403
assert response.json()["detail"] == "No cookie provided :("


def test_example_no_cookie(app_client: TestClient):
response = app_client.get("/example")
assert response.status_code == 403
assert response.json()["detail"] == "No cookie provided :("
2 changes: 0 additions & 2 deletions ytdl_api/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ def init_app(__pydantic_self__) -> FastAPI:

def __setup_endpoints(__pydantic_self__, app: FastAPI):
from ..endpoints import router
from ..enpoints_403 import router as router_403

app.include_router(router, prefix="/api")
app.include_router(router_403, prefix="")

def __setup_exception_handlers(__pydantic_self__, app: FastAPI):
from ..exceptions import ERROR_HANDLERS
Expand Down
52 changes: 0 additions & 52 deletions ytdl_api/enpoints_403.py

This file was deleted.

0 comments on commit edecc79

Please sign in to comment.