Open
Conversation
Temmmmmo
requested changes
Jul 30, 2025
Member
Temmmmmo
left a comment
There was a problem hiding this comment.
очень похоже, что это делалось за 5 минут нейронкой)
Comment on lines
+14
to
+17
| lecturer_data = { | ||
| "name": "Иван Иванов", | ||
| "email": "ivan@example.com" | ||
| } |
Member
There was a problem hiding this comment.
это работает?)
схема запроса вообще не такая
| "email": "ivan@example.com" | ||
| } | ||
| lecturer_response = requests.post(lecturer_url, json=lecturer_data) | ||
| assert lecturer_response.status_code == 201, "Не удалось создать преподавателя" |
Member
There was a problem hiding this comment.
201? у нас 200 обычно приходит в нашей системе
ты сваггер смотрела наш?
| "rating": 5 | ||
| } | ||
| comment_response = requests.post(comment_url, json=comment_data) | ||
| assert comment_response.status_code == 201, "Не удалось создать отзыв" |
| # Проверяем значения полей | ||
| assert data["uuid"] == comment_uuid | ||
| assert data["text"] == "Отличный лектор!" | ||
| assert data["rating"] == 5 |
| assert data["rating"] == 5 | ||
|
|
||
| def test_nonexistent_uuid(self): | ||
| url = f"{BASE_URL}/comment/non-existent-uuid" |
Member
There was a problem hiding this comment.
что это за запрос
такого запроса нет
| assert response.status_code == 422, f"Ожидался статус-код 422, получено {response.status_code}" | ||
|
|
||
| def test_public_endpoint(self): | ||
| url = f"{BASE_URL}/comment/some-uuid" |
| from static.settings import get_settings | ||
|
|
||
| settings = get_settings() | ||
| BASE_URL = settings.BASE_TEST_STAND_URL |
Member
There was a problem hiding this comment.
BASE_TEST_STAND_URL разве у нас есть такая переменная в env?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Изменения
Детали реализации
Check-List
blackиisortдля Back-End илиPrettierдля Front-End?