Commit 5b1b25409b3894d99c02534ca322a3e67b08812a

Authored by mykhaly
1 parent 0aff881d

Add 2-phase commit for tender creation

... ... @@ -77,8 +77,14 @@ Library openprocurement_client_helper.py
77 77 Створити тендер
78 78 [Arguments] ${username} ${tender_data}
79 79 ${tender}= Call Method ${USERS.users['${username}'].client} create_tender ${tender_data}
80   - Log object data ${tender} created_tender
  80 + Log ${tender}
81 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 88 Set To Dictionary ${USERS.users['${username}']} access_token=${access_token}
83 89 Set To Dictionary ${USERS.users['${username}']} tender_data=${tender}
84 90 Log ${USERS.users['${username}'].tender_data}
... ...
... ... @@ -127,6 +127,7 @@ def test_tender_data(params, periods=("enquiry", "tender")):
127 127 data['features'].append(new_feature)
128 128 if not data['features']:
129 129 del data['features']
  130 + data['status'] = 'draft'
130 131 return munchify(data)
131 132
132 133
... ...
Please register or login to post a comment