Commit 5b1b25409b3894d99c02534ca322a3e67b08812a
1 parent
0aff881d
Add 2-phase commit for tender creation
Showing
2 changed files
with
8 additions
and
1 deletions
@@ -77,8 +77,14 @@ Library openprocurement_client_helper.py | @@ -77,8 +77,14 @@ Library openprocurement_client_helper.py | ||
77 | Створити тендер | 77 | Створити тендер |
78 | [Arguments] ${username} ${tender_data} | 78 | [Arguments] ${username} ${tender_data} |
79 | ${tender}= Call Method ${USERS.users['${username}'].client} create_tender ${tender_data} | 79 | ${tender}= Call Method ${USERS.users['${username}'].client} create_tender ${tender_data} |
80 | - Log object data ${tender} created_tender | 80 | + Log ${tender} |
81 | ${access_token}= Get Variable Value ${tender.access.token} | 81 | ${access_token}= Get Variable Value ${tender.access.token} |
82 | + ${status}= Set Variable If 'open' in '${MODE}' active.tendering ${EMPTY} | ||
83 | + ${status}= Set Variable If 'below' in '${MODE}' active.enquiries ${status} | ||
84 | + ${status}= Set Variable If '${status}'=='${EMPTY}' active ${status} | ||
85 | + Set To Dictionary ${tender['data']} status=${status} | ||
86 | + ${tender}= Call Method ${USERS.users['${username}'].client} patch_tender ${tender} | ||
87 | + Log ${tender} | ||
82 | Set To Dictionary ${USERS.users['${username}']} access_token=${access_token} | 88 | Set To Dictionary ${USERS.users['${username}']} access_token=${access_token} |
83 | Set To Dictionary ${USERS.users['${username}']} tender_data=${tender} | 89 | Set To Dictionary ${USERS.users['${username}']} tender_data=${tender} |
84 | Log ${USERS.users['${username}'].tender_data} | 90 | Log ${USERS.users['${username}'].tender_data} |
@@ -127,6 +127,7 @@ def test_tender_data(params, periods=("enquiry", "tender")): | @@ -127,6 +127,7 @@ def test_tender_data(params, periods=("enquiry", "tender")): | ||
127 | data['features'].append(new_feature) | 127 | data['features'].append(new_feature) |
128 | if not data['features']: | 128 | if not data['features']: |
129 | del data['features'] | 129 | del data['features'] |
130 | + data['status'] = 'draft' | ||
130 | return munchify(data) | 131 | return munchify(data) |
131 | 132 | ||
132 | 133 |
Please
register
or
login
to post a comment