Skip to content

first version - #1

Open
Mefite wants to merge 2 commits into
mainfrom
develop2
Open

first version#1
Mefite wants to merge 2 commits into
mainfrom
develop2

Conversation

@Mefite

@Mefite Mefite commented Jan 10, 2026

Copy link
Copy Markdown
Owner

No description provided.

Comment thread api/order_api.py
def __init__(self):
self.client = Client()

def get_ingredients(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: здесь и далее: над каждым логическим методом ставится аннотация allure.step

Comment thread conftest.py Outdated
Comment on lines +19 to +25
@pytest.fixture
def new_user_payload():
return {
"email": random_email(),
"password": random_password(),
"name": random_name(),
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: фикстуры не занимаются прокидыванием данных в тест и выполнением примитивной логики, они выполняют сложную логику предусловий\постусловий и вычислений. Этот метод необходимо описать в модуле helpers и оттуда вызывать в тестах и методах

Comment thread conftest.py Outdated
with allure.step("Register new user"):
response = user_api.register_user(new_user_payload)

assert response.status_code == 200

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: здесь и далее: фикстура не тест, а предусловие, assert в ней не используется

Comment thread data.py

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: data - это модуль для хранения статики, методы хранятся в helpers

Comment thread urls.py Outdated
@@ -0,0 +1,3 @@
BASE_URL = "https://stellarburgers.education-services.ru/api"
TIMEOUT = 15

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Это как относится к urls ?

Comment thread tests/test_create_user.py Outdated

second = user_api.register_user(new_user_payload)
assert second.status_code == 403
assert second.json()["success"] is False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Нужно исправить: здесь и далее: одной проверки на "success" недостаточно, необходимо парсить конкретный ответ

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