{"id":468503,"date":"2025-07-25T03:00:06","date_gmt":"2025-07-25T03:00:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468503"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468503","title":{"rendered":"<span>\u0410\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u044b \u043a\u0430\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f: \u00ab\u0447\u0438\u0441\u0442\u044b\u0439\u00bb \u043a\u043e\u0434 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Regex<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u0430 \u043c\u043d\u043e\u0433\u0438\u043c. \u041a\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u043a\u0435\u0439\u0441\u044b \u0432 Confluence \u2014 \u043d\u0435\u0442. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u0430 \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0442\u0435\u0441\u0442.<\/p>\n<blockquote>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u043d\u044f\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0436\u0438\u0437\u043d\u044c QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u043e\u0441\u043e\u0431\u044b\u043c, \u044d\u043a\u0437\u0438\u0441\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043c\u044b\u0441\u043b\u043e\u043c, \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u043e\u0432, \u0431\u0435\u0441\u0441\u043f\u043e\u0440\u043d\u043e, \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445. \u042d\u0442\u043e\u0442 \u043c\u0435\u0434\u0438\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0438\u0442\u0443\u0430\u043b \u2014 \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence, \u0441\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0451 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u043d\u0443\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c, \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432\u0437\u0434\u043e\u0445\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0442\u0432\u043e\u0440\u0438\u0442\u044c \u2014 \u043d\u0435\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u0430\u043b\u044f\u0435\u0442 \u0434\u0443\u0445. \u041d\u043e, \u0443\u0432\u044b, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0435\u0437\u0436\u0430\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438, \u0441\u043a\u0440\u0435\u043f\u044f \u0441\u0435\u0440\u0434\u0446\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u044e \u044d\u0442\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043c\u0435\u043d\u044f.<\/p>\n<\/blockquote>\n<p>\u0418\u0434\u0435\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u0437 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435 \u043d\u043e\u0432\u0430, \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0446\u0435\u043b\u044c \u2014 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u043c \u0432 \u043a\u043e\u0434 \u0441\u0430\u043c\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u041c\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u0431\u0438\u0437\u043d\u0435\u0441-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u043d\u043e \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442 \u0448\u0430\u0433\u0438 Allure. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h4>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c<\/h4>\n<p>\u042f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0439 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043b\u0438\u0448\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Allure:<\/p>\n<pre><code class=\"python\"># tests\/test_users.py   import allure from schemas.user import UserSchema   @allure.title(\"\u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\") class TestGetUser:     def test_get_user_by_id(self, api_client, Assertions):         # \u041a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u044b\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439         response = api_client.get_user(user_id=2)          Assertions.assert_status_code(response, 200)         Assertions.assert_pydantic_schema(response, UserSchema)         Assertions.assert_json_value_by_name(response, \"first_name\", \"Janet\") <\/code><\/pre>\n<p>&#8230;\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432\u043e\u0442 \u0432 \u0442\u0430\u043a\u0443\u044e \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<h4>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435: \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u043e\u0432<\/h4>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 <code>.md<\/code> \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 1: GET-\u0437\u0430\u043f\u0440\u043e\u0441<\/h3>\n<pre><code class=\"markdown\">### \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  **1. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c GET \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/reqres.in\/api\/users\/2** **2. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: 200** **3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0445\u0435\u043c\u0435 Pydantic 'UserSchema'. \u041e\u0420: \u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f** **4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 'first_name'. \u041e\u0420: 'Janet'**  ---<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 2: POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0442\u0435\u043b\u043e\u043c<\/h3>\n<pre><code class=\"markdown\">### \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  **1. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/reqres.in\/api\/users \u0441 \u0442\u0435\u043b\u043e\u043c: {'name': 'morpheus', 'job': 'leader'}** **2. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: 201** **3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 'name'. \u041e\u0420: 'morpheus'**  ---<\/code><\/pre>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430 100% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0434\u0443. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<h4>\u0428\u0430\u0433 1: \u00ab\u0423\u043c\u043d\u044b\u0439\u00bb API-\u043a\u043b\u0438\u0435\u043d\u0442 \u2014 \u0441\u0435\u0440\u0434\u0446\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0430\u0442\u0442\u0430\u0447\u043c\u0435\u043d\u0442\u044b, \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u0445 \u043f\u0440\u043e\u0449\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435: \u0432\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u0430 Allure<\/strong>.<\/p>\n<pre><code class=\"python\"># helpers\/api_requests.py   import allure import requests import json  class ApiRequests:     @staticmethod     def post(url: str, data: dict = None, headers: dict = None, cookies: dict = None):         return ApiRequests._send(url, data, headers, cookies, \"POST\")      @staticmethod     def get(url: str, data: dict = None, headers: dict = None, cookies: dict = None):         return ApiRequests._send(url, data, headers, cookies, \"GET\")      @staticmethod     def _send(url: str, data: dict, headers: dict, cookies: dict, method: str):         # \u0424\u041e\u0420\u041c\u0418\u0420\u0423\u0415\u041c \u041d\u0410\u0428\u0423 \u0421\u041f\u0415\u0426\u0418\u0410\u041b\u042c\u041d\u0423\u042e \u0421\u0422\u0420\u041e\u041a\u0423 \u0414\u041b\u042f ALLURE         # \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443: \u043c\u0435\u0442\u043e\u0434, URL \u0438 \u0442\u0435\u043b\u043e.         with allure.step(f\"{method} {url}, Request Body: {data}\"):             if headers is None: headers = {}             if cookies is None: cookies = {}              # \u0414\u043b\u044f POST\/PUT\/PATCH \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c `json=data`,             # \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 Content-Type.             if method in ['POST', 'PUT', 'PATCH']:                 r = requests.request(method, url, json=data, headers=headers, cookies=cookies)             else: # \u0414\u043b\u044f GET, DELETE \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b URL                 r = requests.request(method, url, params=data, headers=headers, cookies=cookies)                          return r <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 <code>f\"{method} {url}, Request Body: {data}\"<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0435\u0451 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c.<\/p>\n<h4>\u0428\u0430\u0433 2: \u00ab\u0423\u043c\u043d\u044b\u0435\u00bb \u0430\u0441\u0441\u0435\u0440\u0442\u044b \u2014 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438<\/h4>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u0417\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u044f\u0447\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 <code>allure.step<\/code> \u0432\u043d\u0443\u0442\u0440\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u043e\u0440\u043c\u0430\u0442 <strong>\u00ab\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 X. \u041e\u0420: Y\u00bb<\/strong>.<\/p>\n<pre><code class=\"python\"># helpers\/assertions.py   import allure from requests import Response  class Assertions:     @staticmethod     def assert_status_code(response: Response, code: int):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 \u0440\u0430\u0432\u0435\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443.\"\"\"         with allure.step(f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: {code}\"):             assert response.status_code == code, \\                 f\"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434. \u041e\u0436\u0438\u0434\u0430\u043b\u0441\u044f: {code}, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439: {response.status_code}\"      @staticmethod     def assert_json_value_by_name(response_or_dict, name: str, expected_value: any, step_name: str = None):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 JSON \u043f\u043e \u043a\u043b\u044e\u0447\u0443.\"\"\"         description = step_name or f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 '{name}'\"         with allure.step(f\"{description}. \u041e\u0420: '{expected_value}'\"):             response_as_dict = Assertions._get_json(response_or_dict)             assert name in response_as_dict, f\"\u041a\u043b\u044e\u0447 '{name}' \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 JSON \u043e\u0442\u0432\u0435\u0442\u0435.\"             actual_value = response_as_dict.get(name)             assert actual_value == expected_value, \\                 f\"\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 '{name}'. \u041e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c: '{expected_value}', \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435: '{actual_value}'\"      @staticmethod     def assert_pydantic_schema(response_or_dict, schema: BaseModel):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 JSON \u043e\u0442\u0432\u0435\u0442\u0430 Pydantic-\u0441\u0445\u0435\u043c\u0435.\"\"\"         with allure.step(f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0445\u0435\u043c\u0435 Pydantic '{schema.__name__}'. \u041e\u0420: \u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f\"):             json_to_validate = Assertions._get_json(response_or_dict)             try:                 schema.model_validate(json_to_validate)             except ValidationError as e:                 allure.attach(body=e.json(), name=\"Pydantic validation error\", attachment_type=allure.attachment_type.JSON)                 raise AssertionError(f\"JSON \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0445\u0435\u043c\u0435 '{schema.__name__}':\\n{e}\") <\/code><\/pre>\n<h4>\u0428\u0430\u0433 3: \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Regex \u2014 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2014 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0442\u0447\u0435\u0442\u044b Allure. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\"># generate_test_cases.py   import os import json import pathlib import re  ALLURE_RESULTS_DIR = 'allure_results' TEST_CASES_OUTPUT_DIR = 'test_cases'  def generate_test_cases():     results_path = pathlib.Path(ALLURE_RESULTS_DIR)     output_path = pathlib.Path(TEST_CASES_OUTPUT_DIR)      if not results_path.is_dir():         print(f\"\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f '{ALLURE_RESULTS_DIR}' \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.\")         return     output_path.mkdir(exist_ok=True)      # \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0448\u0430\u0433\u0430 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c     request_pattern = re.compile(         r\"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\\s+(.*?),\\s+Request Body:\\s+(.*)$\"     )      for result_file in results_path.glob('*-result.json'):         with open(result_file, 'r', encoding='utf-8') as f:             data = json.load(f)          if 'name' not in data or 'steps' not in data:             continue                  test_case_title = next((label['value'] for label in data.get('labels', []) if label['name'] == 'title'), data['name'])         md_content = f\"### {test_case_title}\\n\\n\"                  for i, step in enumerate(data['steps'], 1):             step_name = step.get('name', '\u0428\u0430\u0433 \u0431\u0435\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f')             match = request_pattern.match(step_name)                          if match:                 method, url, body_str = match.groups()                 step_text = f\"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c {method} \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 {url}\"                 if body_str != 'None':                     step_text += f\" \u0441 \u0442\u0435\u043b\u043e\u043c: {body_str}\"                 md_content += f\"**{i}. {step_text}**\\n\"             else:                 md_content += f\"**{i}. {step_name}**\\n\"                      test_file_name = data.get('fullName', data['name']).split('.')[-2].replace(\"test_\", \"\")         output_file = output_path \/ f\"{test_file_name}.md\"         with open(output_file, 'a', encoding='utf-8') as f:             f.write(md_content + \"\\n---\\n\")  if __name__ == \"__main__\":     generate_test_cases() <\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>\u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0440\u0430\u0432\u0434\u044b<\/strong>. \u041a\u043e\u0434 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439, \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0427\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u043e\u0432:<\/strong> \u0422\u0435\u0441\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443, \u0430 \u043d\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c:<\/strong> \u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Regex \u043f\u0440\u043e\u0441\u0442 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/strong> \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c:<\/strong> \u041b\u044e\u0431\u043e\u0439 \u0447\u043b\u0435\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0435\u0441\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 <code>.md<\/code> \u0444\u0430\u0439\u043b.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 Jira, \u0447\u0442\u043e \u0431\u044b \u043a\u0435\u0439\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432, \u0447\u0442\u043e \u0431\u044b \u043e\u043d \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u043b \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API Jira. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u0438\u0439 \u0431\u0435\u043a\u043b\u043e\u0433, \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043d\u0435 \u043b\u0435\u043d\u044c \ud83d\ude42<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443 \u0441\u0435\u0431\u044f \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0431\u043e\u043b\u0438 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. <\/p>\n<p>\u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u043c\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0431 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/930908\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u043d\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041a\u0440\u0443\u0442\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435!<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0435\/\u0442\u0438\u043c\u043b\u0438\u0434\u0443.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u043e\u043a\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041c\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">100% <\/span><span class=\"tm-article-poll__answer-label\">\u041f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c.<\/span><span class=\"tm-article-poll__answer-votes\">1<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 100%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/930908\/\"> https:\/\/habr.com\/ru\/articles\/930908\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u0430 \u043c\u043d\u043e\u0433\u0438\u043c. \u041a\u043e\u0434 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u043a\u0435\u0439\u0441\u044b \u0432 Confluence \u2014 \u043d\u0435\u0442. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u0430 \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u043e\u0442 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u0442\u0435\u0441\u0442.<\/p>\n<blockquote>\n<p>\u0415\u0441\u0442\u044c \u0437\u0430\u043d\u044f\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0436\u0438\u0437\u043d\u044c QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430 \u043e\u0441\u043e\u0431\u044b\u043c, \u044d\u043a\u0437\u0438\u0441\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043c\u044b\u0441\u043b\u043e\u043c, \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u043e\u0432, \u0431\u0435\u0441\u0441\u043f\u043e\u0440\u043d\u043e, \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445. \u042d\u0442\u043e\u0442 \u043c\u0435\u0434\u0438\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0438\u0442\u0443\u0430\u043b \u2014 \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 Confluence, \u0441\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0451 \u0441 \u043a\u043e\u0434\u043e\u043c, \u043e\u0441\u043e\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u043d\u0443\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u044c, \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432\u0437\u0434\u043e\u0445\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0442\u0432\u043e\u0440\u0438\u0442\u044c \u2014 \u043d\u0435\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u043d\u043e \u0437\u0430\u043a\u0430\u043b\u044f\u0435\u0442 \u0434\u0443\u0445. \u041d\u043e, \u0443\u0432\u044b, \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0435\u0437\u0436\u0430\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u043a \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u043c\u0435\u043d\u044f \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438\u043c \u0441\u0432\u044f\u0449\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0438, \u0441\u043a\u0440\u0435\u043f\u044f \u0441\u0435\u0440\u0434\u0446\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u044e \u044d\u0442\u0443 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043c\u0435\u043d\u044f.<\/p>\n<\/blockquote>\n<p>\u0418\u0434\u0435\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u0437 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435 \u043d\u043e\u0432\u0430, \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0435\u043c\u0430\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0446\u0435\u043b\u044c \u2014 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u043c \u0432 \u043a\u043e\u0434 \u0441\u0430\u043c\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u041c\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u0431\u0438\u0437\u043d\u0435\u0441-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u043d\u043e \u043c\u043e\u0449\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442 \u0448\u0430\u0433\u0438 Allure. \u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<h4>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c<\/h4>\n<p>\u042f \u0445\u043e\u0447\u0443, \u0447\u0442\u043e\u0431\u044b \u0442\u0430\u043a\u043e\u0439 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u043b\u0438\u0448\u0435\u043d\u043d\u044b\u0439 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Allure:<\/p>\n<pre><code class=\"python\"># tests\/test_users.py   import allure from schemas.user import UserSchema   @allure.title(\"\u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\") class TestGetUser:     def test_get_user_by_id(self, api_client, Assertions):         # \u041a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430 \u2014 \u044d\u0442\u043e \u0447\u0438\u0441\u0442\u044b\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439         response = api_client.get_user(user_id=2)          Assertions.assert_status_code(response, 200)         Assertions.assert_pydantic_schema(response, UserSchema)         Assertions.assert_json_value_by_name(response, \"first_name\", \"Janet\") <\/code><\/pre>\n<p>&#8230;\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432\u043e\u0442 \u0432 \u0442\u0430\u043a\u0443\u044e \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<h4>\u0427\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435: \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0435\u0441\u0442-\u043a\u0435\u0439\u0441\u043e\u0432<\/h4>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 <code>.md<\/code> \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 1: GET-\u0437\u0430\u043f\u0440\u043e\u0441<\/h3>\n<pre><code class=\"markdown\">### \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  **1. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c GET \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/reqres.in\/api\/users\/2** **2. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: 200** **3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0445\u0435\u043c\u0435 Pydantic 'UserSchema'. \u041e\u0420: \u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f** **4. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 'first_name'. \u041e\u0420: 'Janet'**  ---<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 2: POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u0442\u0435\u043b\u043e\u043c<\/h3>\n<pre><code class=\"markdown\">### \u0423\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  **1. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c POST \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 https:\/\/reqres.in\/api\/users \u0441 \u0442\u0435\u043b\u043e\u043c: {'name': 'morpheus', 'job': 'leader'}** **2. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: 201** **3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 'name'. \u041e\u0420: 'morpheus'**  ---<\/code><\/pre>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430 100% \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0434\u0443. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<h4>\u0428\u0430\u0433 1: \u00ab\u0423\u043c\u043d\u044b\u0439\u00bb API-\u043a\u043b\u0438\u0435\u043d\u0442 \u2014 \u0441\u0435\u0440\u0434\u0446\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u0430\u0442\u0442\u0430\u0447\u043c\u0435\u043d\u0442\u044b, \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u0445 \u043f\u0440\u043e\u0449\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u0435\u0435: \u0432\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f <strong>\u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0448\u0430\u0433\u0430 Allure<\/strong>.<\/p>\n<pre><code class=\"python\"># helpers\/api_requests.py   import allure import requests import json  class ApiRequests:     @staticmethod     def post(url: str, data: dict = None, headers: dict = None, cookies: dict = None):         return ApiRequests._send(url, data, headers, cookies, \"POST\")      @staticmethod     def get(url: str, data: dict = None, headers: dict = None, cookies: dict = None):         return ApiRequests._send(url, data, headers, cookies, \"GET\")      @staticmethod     def _send(url: str, data: dict, headers: dict, cookies: dict, method: str):         # \u0424\u041e\u0420\u041c\u0418\u0420\u0423\u0415\u041c \u041d\u0410\u0428\u0423 \u0421\u041f\u0415\u0426\u0418\u0410\u041b\u042c\u041d\u0423\u042e \u0421\u0422\u0420\u041e\u041a\u0423 \u0414\u041b\u042f ALLURE         # \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0443: \u043c\u0435\u0442\u043e\u0434, URL \u0438 \u0442\u0435\u043b\u043e.         with allure.step(f\"{method} {url}, Request Body: {data}\"):             if headers is None: headers = {}             if cookies is None: cookies = {}              # \u0414\u043b\u044f POST\/PUT\/PATCH \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c `json=data`,             # \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 Content-Type.             if method in ['POST', 'PUT', 'PATCH']:                 r = requests.request(method, url, json=data, headers=headers, cookies=cookies)             else: # \u0414\u043b\u044f GET, DELETE \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b URL                 r = requests.request(method, url, params=data, headers=headers, cookies=cookies)                          return r <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 <code>f\"{method} {url}, Request Body: {data}\"<\/code> \u2014 \u044d\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442. \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 \u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0435\u0451 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c.<\/p>\n<h4>\u0428\u0430\u0433 2: \u00ab\u0423\u043c\u043d\u044b\u0435\u00bb \u0430\u0441\u0441\u0435\u0440\u0442\u044b \u2014 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438<\/h4>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u044d\u0442\u043e \u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u0417\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u044f\u0447\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 <code>allure.step<\/code> \u0432\u043d\u0443\u0442\u0440\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u043e\u0440\u043c\u0430\u0442 <strong>\u00ab\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 X. \u041e\u0420: Y\u00bb<\/strong>.<\/p>\n<pre><code class=\"python\"># helpers\/assertions.py   import allure from requests import Response  class Assertions:     @staticmethod     def assert_status_code(response: Response, code: int):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 \u0440\u0430\u0432\u0435\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443.\"\"\"         with allure.step(f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434\u0430. \u041e\u0420: {code}\"):             assert response.status_code == code, \\                 f\"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0443\u0441-\u043a\u043e\u0434. \u041e\u0436\u0438\u0434\u0430\u043b\u0441\u044f: {code}, \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439: {response.status_code}\"      @staticmethod     def assert_json_value_by_name(response_or_dict, name: str, expected_value: any, step_name: str = None):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 JSON \u043f\u043e \u043a\u043b\u044e\u0447\u0443.\"\"\"         description = step_name or f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430 '{name}'\"         with allure.step(f\"{description}. \u041e\u0420: '{expected_value}'\"):             response_as_dict = Assertions._get_json(response_or_dict)             assert name in response_as_dict, f\"\u041a\u043b\u044e\u0447 '{name}' \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 JSON \u043e\u0442\u0432\u0435\u0442\u0435.\"             actual_value = response_as_dict.get(name)             assert actual_value == expected_value, \\                 f\"\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u043b\u044e\u0447\u0430 '{name}'. \u041e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c: '{expected_value}', \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435: '{actual_value}'\"      @staticmethod     def assert_pydantic_schema(response_or_dict, schema: BaseModel):         \"\"\"\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 JSON \u043e\u0442\u0432\u0435\u0442\u0430 Pydantic-\u0441\u0445\u0435\u043c\u0435.\"\"\"         with allure.step(f\"\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0445\u0435\u043c\u0435 Pydantic '{schema.__name__}'. \u041e\u0420: \u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f\"):             json_to_validate = Assertions._get_json(response_or_dict)             try:                 schema.model_validate(json_to_validate)             except ValidationError as e:                 allure.attach(body=e.json(), name=\"Pydantic validation error\", attachment_type=allure.attachment_type.JSON)                 raise AssertionError(f\"JSON \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0445\u0435\u043c\u0435 '{schema.__name__}':\\n{e}\") <\/code><\/pre>\n<h4>\u0428\u0430\u0433 3: \u0413\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0430 Regex \u2014 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2014 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0442\u0447\u0435\u0442\u044b Allure. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\"># generate_test_cases.py   import os import json import pathlib import re  ALLURE_RESULTS_DIR = 'allure_results' TEST_CASES_OUTPUT_DIR = 'test_cases'  def generate_test_cases():     results_path = pathlib.Path(ALLURE_RESULTS_DIR)     output_path = pathlib.Path(TEST_CASES_OUTPUT_DIR)      if not results_path.is_dir():         print(f\"\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f '{ALLURE_RESULTS_DIR}' \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430.\")         return     output_path.mkdir(exist_ok=True)      # \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0448\u0430\u0433\u0430 \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c     request_pattern = re.compile(         r\"^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\\s+(.*?),\\s+Request Body:\\s+(.*)$\"     )      for result_file in results_path.glob('*-result.json'):         with open(result_file, 'r', encoding='utf-8') as f:             data = json.load(f)          if 'name' not in data or 'steps' not in data:             continue                  test_case_title = next((label['value'] for label in data.get('labels', []) if label['name'] == 'title'), data['name'])         md_content = f\"### {test_case_title}\\n\\n\"                  for i, step in enumerate(data['steps'], 1):             step_name = step.get('name', '\u0428\u0430\u0433 \u0431\u0435\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f')             match = request_pattern.match(step_name)                          if match:                 method, url, body_str = match.groups()                 step_text = f\"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c {method} \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 {url}\"                 if body_str != 'None':                     step_text += f\" \u0441 \u0442\u0435\u043b\u043e\u043c: {body_str}\"                 md_content += f\"**{i}. {step_text}**\\n\"             else:                 md_content += f\"**{i}. {step_name}**\\n\"                      test_file_name = data.get('fullName', data['name']).split('.')[-2].replace(\"test_\", \"\")         output_file = output_path \/ f\"{test_file_name}.md\"         with open(output_file, 'a', encoding='utf-8') as f:             f.write(md_content + \"\\n---\\n\")  if __name__ == \"__main__\":     generate_test_cases() <\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>\u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0440\u0430\u0432\u0434\u044b<\/strong>. \u041a\u043e\u0434 \u0430\u0432\u0442\u043e\u0442\u0435\u0441\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439, \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<p><strong>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u0427\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u043e\u0432:<\/strong> \u0422\u0435\u0441\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443, \u0430 \u043d\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043e\u0442\u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c:<\/strong> \u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Regex \u043f\u0440\u043e\u0441\u0442 \u0438 \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c:<\/strong> \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c:<\/strong> \u041b\u044e\u0431\u043e\u0439 \u0447\u043b\u0435\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0435\u0441\u0442, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 <code>.md<\/code> \u0444\u0430\u0439\u043b.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 Jira, \u0447\u0442\u043e \u0431\u044b \u043a\u0435\u0439\u0441\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432, \u0447\u0442\u043e \u0431\u044b \u043e\u043d \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u043b \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API Jira. \u0414\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u0438\u0439 \u0431\u0435\u043a\u043b\u043e\u0433, \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u044f \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043d\u0435 \u043b\u0435\u043d\u044c \ud83d\ude42<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443 \u0441\u0435\u0431\u044f \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u0431\u044b\u0442\u044c \u043e \u0431\u043e\u043b\u0438 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. <\/p>\n<p>\u0414\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u043c\u043d\u0435\u043d\u0438\u0435\u043c \u043e\u0431 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \ud83d\ude42<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/articles\/930908\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u0438\u0435 \u043f\u043b\u0430\u043d\u044b \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041a\u0440\u0443\u0442\u043e, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435!<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0438\u0434\u0435\u044f, \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0435\/\u0442\u0438\u043c\u043b\u0438\u0434\u0443.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u043f\u043e\u043a\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u041c\u044b \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">100% <\/span><span class=\"tm-article-poll__answer-label\">\u041f\u0440\u043e\u0441\u0442\u043e \u0431\u044b\u043b\u043e<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-468503","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468503"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468503\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}