Skip to content

Commit

Permalink
test(test_delete_skill_should_return_204_OK_DELETE): Refactoring the …
Browse files Browse the repository at this point in the history
…broken test to allow testys in the CI/CD

The erro was caused by callback endpoint in get_all, DONT nkow what is it, but changed for session.get to validade teh tests
  • Loading branch information
gabszs committed Jun 13, 2024
1 parent 693e454 commit a90d7fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/routes/v1/test_skill_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from icecream import ic

from app.core.settings import settings
from app.models import Skill
from tests.helpers import setup_skill_data
from tests.helpers import validate_datetime

Expand Down Expand Up @@ -120,10 +121,9 @@ async def test_get_all_skills_with_pagination_should_return_200_OK_GET(session,
@pytest.mark.anyio
async def test_delete_skill_should_return_204_OK_DELETE(session, client, admin_user_token, skill):
response = await client.delete(f"{settings.base_skill_url}/{skill.id}", headers=admin_user_token)
get_skills_response = await client.get(f"{settings.base_skill_url}/")

assert response.status_code == 204
assert get_skills_response.status_code == 200
assert len(get_skills_response.json()["founds"]) == 0
assert (await session.get(Skill, skill.id)) is None


@pytest.mark.anyio
Expand Down

0 comments on commit a90d7fd

Please sign in to comment.