mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
fix unit tests
This commit is contained in:
parent
5d5ea60ca6
commit
a6cceeef73
2
.github/workflows/build-and-test.yml
vendored
2
.github/workflows/build-and-test.yml
vendored
@ -60,6 +60,6 @@ jobs:
|
|||||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
run: poetry install --no-interaction --no-root
|
run: poetry install --no-interaction --no-root
|
||||||
- name: Test Code
|
- name: Test Code
|
||||||
run: poetry run pytest
|
run: poetry run pytest tests/
|
||||||
- name: Lint Code
|
- name: Lint Code
|
||||||
run: poetry run ruff .
|
run: poetry run ruff .
|
||||||
|
2
Makefile
2
Makefile
@ -27,7 +27,7 @@ docker-create-db-migration: ## Create new alembic database migration aka databa
|
|||||||
|
|
||||||
.PHONY: docker-test
|
.PHONY: docker-test
|
||||||
docker-test: ## Run project tests
|
docker-test: ## Run project tests
|
||||||
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm app pytest
|
docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm app pytest tests
|
||||||
|
|
||||||
.PHONY: docker-test-snapshot
|
.PHONY: docker-test-snapshot
|
||||||
docker-test-snapshot: ## Run project tests with inline snapshot
|
docker-test-snapshot: ## Run project tests with inline snapshot
|
||||||
|
@ -5,9 +5,9 @@ class Stuff(HttpUser):
|
|||||||
wait_time = between(1, 3)
|
wait_time = between(1, 3)
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def test_find(self):
|
def find_stuff(self):
|
||||||
self.client.get("/v1/stuff/string")
|
self.client.get("/v1/stuff/string")
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def test_find_pool(self):
|
def find_stuff_with_pool(self):
|
||||||
self.client.get("/v1/stuff/pool/string")
|
self.client.get("/v1/stuff/pool/string")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user