Skip to content

Commit d1f3830

Browse files
committed
В тестах изменено начисляемое число баллов на соответствующее нововой логике проекта
1 parent d67e69a commit d1f3830

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

apps/questions/mapping.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77

88
class TypeQuestionPoints(Enum):
9-
INFO_SLIDE: int = 5
10-
QUESTION_SINGLE_ANSWER: int = 5
11-
QUESTION_WRITE: int = 5
12-
QUESTION_CONNECT: int = 5
13-
QUESTION_EXCLUDE: int = 5
9+
INFO_SLIDE: int = 20
10+
QUESTION_SINGLE_ANSWER: int = 20
11+
QUESTION_WRITE: int = 20
12+
QUESTION_CONNECT: int = 20
13+
QUESTION_EXCLUDE: int = 20
1414
QUESTION_WO_POINTS: int = 0
1515

1616

apps/tests/courses_tests/test_courses_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class TestTaskResultPathResponse:
285285
OLD_SUB_NEXT_TASK_ID: int = 2
286286
NEW_SUB_PERCENT_PROGRESS: int = 50
287287
OLD_SUB_PERCENT_PROGRESS: int = 13
288-
POINTS_GAINED: int = 5
288+
POINTS_GAINED: int = 20
289289
DONE_CORRECT: int = 1
290290

291291
@pytest.mark.usefixtures("full_filled_published_skill")

apps/tests/fixtures/skill_answers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ def skill_three_users_answers(
2929
TaskObjUserResult.objects.create(
3030
task_object_id=task_obj_idx,
3131
user_profile=user_admin_with_trial_sub.profiles,
32-
points_gained=5
32+
points_gained=20
3333
)
3434
for task_obj_idx in range(1, 3):
3535
TaskObjUserResult.objects.create(
3636
task_object_id=task_obj_idx,
3737
user_profile=user_staff_with_trial_sub.profiles,
38-
points_gained=5
38+
points_gained=20
3939
)
4040

4141
TaskObjUserResult.objects.create(
4242
task_object_id=1,
4343
user_profile=user_with_trial_sub.profiles,
44-
points_gained=5
44+
points_gained=20
4545
)
4646

4747

apps/tests/progress_tests/test_progress_response.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TestProgressProfileResponse:
4848
Тесты пути: `/progress/profile/`
4949
"""
5050

51-
POINTS_IN_PROFILE: int = 5
51+
POINTS_IN_PROFILE: int = 20
5252
SKILL_PERCENT_DONE: int = 13
5353

5454
def test_progress_profile_new_sub_full_data(self, api_auth_with_sub_client: APIClient):
@@ -131,7 +131,7 @@ class TestUserScoreRating:
131131
Тесты пути: `/progress/user-rating/?time_frame=...`
132132
"""
133133

134-
SINGLE_SCORE_COUNT = 5
134+
SINGLE_SCORE_COUNT = 20
135135

136136
@pytest.mark.parametrize("time_frame", ("last_day", "last_month", "last_year"))
137137
def test_empty_data_without_answers(self, time_frame: str, api_auth_with_sub_client: APIClient):
@@ -169,7 +169,11 @@ def test_free_single_answer_by_new_sub(self, time_frame: str, api_auth_with_sub_
169169
def test_user_rating_with_different_roles(self, time_frame: str, api_auth_with_sub_client: APIClient):
170170
"""Все ответы даны в 1 время, таймлайн не решает, рейтинг по дате должен быть одинаковым."""
171171
response = api_auth_with_sub_client.get(constants.USER_SCORE_RATING_PATH + f"?time_frame={time_frame}")
172+
print("1"*100)
173+
print(response)
172174
response_dct = response.json()
175+
print("1"*100)
176+
print(response_dct)
173177
assert (
174178
response_dct["count"] == 1
175179
), "В рейтинге должeн быть 1 пользователь (Стафф и админ не должны отображаться)"

0 commit comments

Comments
 (0)