Skip to content

QA 104 Тест Создание профиля лектора#8

Open
GinKo314 wants to merge 5 commits intomainfrom
gamma
Open

QA 104 Тест Создание профиля лектора#8
GinKo314 wants to merge 5 commits intomainfrom
gamma

Conversation

@GinKo314
Copy link
Copy Markdown

Изменения

Детали реализации

проверка данных на корректность при запросе на создание авторизованным и нет пользователем по средству анализа получаемых статус-код ответов

Особенности
для авторизованной проверки нужен токен, если есть .env файл, то в conftests укажите до него путь

@GinKo314 GinKo314 requested a review from Temmmmmo July 23, 2025 17:51
import json


load_dotenv(dotenv_path="C:/.env/.env")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

путь убери

Comment on lines +42 to +58
#@pytest.fixture()
#def get_last_timetable_id():
"""getall_limit = 1
getall_ofset = 0
timetable_id_list=[]
get_response_all = requests.get(f"{BASE_URL}/lecturer?limit={getall_limit}&offset={getall_ofset}&order_by=mark_weighted&asc_order=false")
get_response_all_json = get_response_all.json()
while len(timetable_id_list) < get_response_all_json["total"]:
getall_ofset+=1
get_response_all = requests.get(f"{BASE_URL}/lecturer?limit={getall_limit}&offset={getall_ofset}&order_by=mark_weighted&asc_order=false")
get_response_all_json = get_response_all.json()
print(get_response_all_json["lecturers"][0]["timetable_id"])
timetable_id_list.append(get_response_all_json["lecturers"][0]["timetable_id"])
print(getall_ofset)
print(len(timetable_id_list))
print(getall_ofset)
sorted(timetable_id_list)"""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

комменты уберем

from conftest import BASE_URL, BASE_HEADERS, HEADERS_USER_A

lecturer_id = 6799
text_filename = "text_example_3000_plus.txt"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а что за файл?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

текстовый файл на 3000+ символов для проверки ограничения

Copy link
Copy Markdown
Member

@Temmmmmo Temmmmmo Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно проще
питон умеет умножать строки

поэтому можно вот так:
big_3000_symbols_string = 3000 * 'a'

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

хорошо, спасибо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants