diff --git a/server/app/apis/auth.py b/server/app/apis/auth.py index 306392ff64c6cbf1af7723bc1cdeeb9f4e5084df..8fe25b6b7e52b0b4f28a4aa0b88e5ac9d9c830b3 100644 --- a/server/app/apis/auth.py +++ b/server/app/apis/auth.py @@ -1,17 +1,12 @@ import app.core.controller as dbc -import app.core.utils.http_codes as codes +import app.core.http_codes as codes from app.apis import admin_required from app.core.dto import AuthDTO from app.core.models import User from app.core.parsers import create_user_parser, login_parser -from flask_jwt_extended import ( - create_access_token, - create_refresh_token, - get_jwt_identity, - get_raw_jwt, - jwt_refresh_token_required, - jwt_required, -) +from flask_jwt_extended import (create_access_token, create_refresh_token, + get_jwt_identity, get_raw_jwt, + jwt_refresh_token_required, jwt_required) from flask_restx import Namespace, Resource, cors api = AuthDTO.api diff --git a/server/app/apis/competitions.py b/server/app/apis/competitions.py index 2fed07aabd9f79b2b06bdfd2fcc06765f691bc2a..ac7384dfdea97a738af22aa91f89aa0eea56904d 100644 --- a/server/app/apis/competitions.py +++ b/server/app/apis/competitions.py @@ -1,5 +1,5 @@ import app.core.controller as dbc -import app.core.utils.http_codes as codes +import app.core.http_codes as codes from app.apis import admin_required from app.core.dto import CompetitionDTO from app.core.models import Competition, Slide, Team diff --git a/server/app/apis/slides.py b/server/app/apis/slides.py index 833b0651820eb9b492a4dfbc12691c3cadb28d44..6399ebc77c999563522db32a14db55bf126bf63b 100644 --- a/server/app/apis/slides.py +++ b/server/app/apis/slides.py @@ -1,5 +1,5 @@ import app.core.controller as dbc -import app.core.utils.http_codes as codes +import app.core.http_codes as codes from app.apis import admin_required from app.core.dto import SlideDTO from app.core.models import Competition, Slide diff --git a/server/app/apis/teams.py b/server/app/apis/teams.py index 0b155f202c68d44f8c5053fc1fc95a3abcf37c28..02c730bb64200a26fa160210b6b42a526b334070 100644 --- a/server/app/apis/teams.py +++ b/server/app/apis/teams.py @@ -1,5 +1,5 @@ import app.core.controller as dbc -import app.core.utils.http_codes as codes +import app.core.http_codes as codes from app.apis import admin_required from app.core.dto import TeamDTO from app.core.models import Competition, Team diff --git a/server/app/apis/users.py b/server/app/apis/users.py index 4ea7dee8750c1bc725393434a91d1851bf9f6272..43e304c11a5c86bee2e9482a30d22a9c163e9861 100644 --- a/server/app/apis/users.py +++ b/server/app/apis/users.py @@ -1,5 +1,5 @@ import app.core.controller as dbc -import app.core.utils.http_codes as codes +import app.core.http_codes as codes from app.apis import admin_required from app.core.dto import UserDTO from app.core.models import User diff --git a/server/app/core/utils/http_codes.py b/server/app/core/http_codes.py similarity index 100% rename from server/app/core/utils/http_codes.py rename to server/app/core/http_codes.py diff --git a/server/app/core/utils/__init__.py b/server/app/core/utils/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/server/tests/test_app.py b/server/tests/test_app.py index ce0255c3480e823a1729c6ccb635458732b185ef..ce897883c3dcf15d793ccc9d7a6d6bda0ac03498 100644 --- a/server/tests/test_app.py +++ b/server/tests/test_app.py @@ -1,8 +1,5 @@ -import json - -from app.core.utils.test_helpers import add_default_values, delete, get, post, put - from tests import app, client, db +from tests.test_helpers import add_default_values, delete, get, post, put def test_competition(client): diff --git a/server/tests/test_db.py b/server/tests/test_db.py index f670e4926390e69bc101dcda39ab1769e6c64aa9..46bd599657368be76ea28d4009332583ef8b814c 100644 --- a/server/tests/test_db.py +++ b/server/tests/test_db.py @@ -1,9 +1,7 @@ from app.core.models import City, Competition, Media, MediaType, Question, QuestionType, Role, Slide, Style, Team, User -from app.core.utils.test_helpers import add_default_values, assert_exists, assert_insert_fail from tests import app, client, db - -# server/env/Scripts/pytest.exe --cov app server/tests/ +from tests.test_helpers import add_default_values, assert_exists, assert_insert_fail def test_user(client): diff --git a/server/app/core/utils/test_helpers.py b/server/tests/test_helpers.py similarity index 99% rename from server/app/core/utils/test_helpers.py rename to server/tests/test_helpers.py index 648bc27a41aba569f3bd61a36d02a24929703558..dd78fc8a0d2ab2180a485a87746fe1104c1ca27e 100644 --- a/server/app/core/utils/test_helpers.py +++ b/server/tests/test_helpers.py @@ -1,7 +1,6 @@ import json import app.core.controller as dbc -import pytest from app.core import db from app.core.models import City, MediaType, QuestionType, Role, Style, User