More and more refactors

This commit is contained in:
lvrossem
2023-04-17 15:38:25 -06:00
parent 81e9eb154b
commit d074074b03
11 changed files with 139 additions and 42 deletions

View File

@@ -3,7 +3,7 @@ import random
import pytest
from src.enums import MinigameEnum
from tests.base import client, password, avatar_index, register_user
from tests.base import avatar_index, client, password, register_user
from tests.config.database import clear_db

View File

@@ -8,7 +8,6 @@ patched_password = "New password"
patched_avatar_index = 2
@pytest.mark.asyncio
async def test_patch_user():
"""Test the patching of a user's username, password and avatar"""
@@ -62,7 +61,7 @@ async def test_patch_user_with_empty_fields():
"username": "",
"password": patched_password,
"avatar_index": patched_avatar_index,
"playtime": 0.0
"playtime": 0.0,
},
headers=headers,
)
@@ -74,7 +73,7 @@ async def test_patch_user_with_empty_fields():
"username": username,
"password": patched_password,
"avatar_index": -1,
"playtime": 0.0
"playtime": 0.0,
},
headers=headers,
)
@@ -86,7 +85,7 @@ async def test_patch_user_with_empty_fields():
"username": username,
"password": "",
"avatar_index": patched_avatar_index,
"playtime": 0.0
"playtime": 0.0,
},
headers=headers,
)