♻️ Refactor code structure for tests (#674)

This commit is contained in:
Sebastián Ramírez
2024-03-11 17:49:35 +01:00
committed by GitHub
parent 20f6020c7c
commit ed9958bc1e
9 changed files with 5 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
from fastapi.testclient import TestClient
from app.core.config import settings
def test_celery_worker_test(
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
data = {"message": "test"}
r = client.post(
f"{settings.API_V1_STR}/utils/test-celery/",
json=data,
headers=superuser_token_headers,
)
response = r.json()
assert response["message"] == "Word received"