Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report dependency fixes #45

Merged
merged 3 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# .vscode/*.DS_Store
# .vscode/*.DS_Store
pytest_report.xml
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ for line in sys.stdin:
endef
export PRINT_HELP_PYSCRIPT

export ENV=DEV
export DATABASE_URL=mysql+aiomysql://root:root_bot_buster@localhost/playerdata
export KAFKA_HOST=localhost:9094
export POOL_RECYCLE=60
export POOL_TIMEOUT=30

help:
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)

Expand Down Expand Up @@ -78,6 +84,7 @@ test-setup: pre-commit-setup## installs pytest singular package for local testin
python3 -m pip install pytest
python3 -m pip install requests
python3 -m pip install hypothesis
python3 -m pip install pytest-asyncio

requirements: ## installs all requirements
python3 -m pip install -r requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# conftest.py
import asyncio
import os
import sys
from contextlib import asynccontextmanager
Expand All @@ -15,6 +16,7 @@

from src.core import server # noqa: E402
from src.core.fastapi.dependencies.session import get_session # noqa: E402
from src.core import config

# Create an async SQLAlchemy engine
engine = create_async_engine(
Expand Down Expand Up @@ -52,6 +54,7 @@ def app() -> FastAPI:
@pytest.fixture
@asynccontextmanager
async def custom_client(app: FastAPI):
config.send_queue = asyncio.Queue(maxsize=500)
base_url = "http://srv.test/"
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url=base_url) as client:
Expand Down
Loading