Skip to content

Готовый проект 7 спринта - #1

Open
FomenkoIS wants to merge 1 commit into
mainfrom
develop
Open

Готовый проект 7 спринта#1
FomenkoIS wants to merge 1 commit into
mainfrom
develop

Conversation

@FomenkoIS

Copy link
Copy Markdown
Owner

No description provided.

Comment thread data.py
}

# отправляем запрос на регистрацию курьера и сохраняем ответ в переменную response
response = requests.post('https://qa-scooter.praktikum-services.ru/api/v1/courier', json=payload)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Можно лучше: urlы уже хранятся в отдельном модуле - импортируем как константу

}
response = CourierMethods.create_courier(courier_dict)
assert response.status_code == 409, f"Expected status code 409, but got {response.status_code}"
assert "Этот логин уже используется" in response.json()["message"], f"Successful registration of two identical courier"

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

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