Commit 4ec1c49c80bbf8a7e356344c1c3d1b93ba0c4fdf

Authored by mykhaly
1 parent 5b1b2540

Add 2-phase commit for bid creation

@@ -704,9 +704,13 @@ Library openprocurement_client_helper.py @@ -704,9 +704,13 @@ Library openprocurement_client_helper.py
704 \ ${code}= Get Variable Value ${tender.data.features[${feature_index}].code} 704 \ ${code}= Get Variable Value ${tender.data.features[${feature_index}].code}
705 \ Set To Dictionary ${bid.data.parameters[${index}]} code=${code} 705 \ Set To Dictionary ${bid.data.parameters[${index}]} code=${code}
706 ${reply}= Call Method ${USERS.users['${username}'].client} create_bid ${tender} ${bid} 706 ${reply}= Call Method ${USERS.users['${username}'].client} create_bid ${tender} ${bid}
  707 + Log ${reply}
  708 + ${status}= Set Variable If '${MODE}'=='openeu' pending active
  709 + Set To Dictionary ${reply['data']} status=${status}
  710 + ${reply_active}= Call Method ${USERS.users['${username}'].client} patch_bid ${tender} ${reply}
707 Set To Dictionary ${USERS.users['${username}']} access_token=${reply['access']['token']} 711 Set To Dictionary ${USERS.users['${username}']} access_token=${reply['access']['token']}
708 Set To Dictionary ${USERS.users['${username}'].bidresponses['bid'].data} id=${reply['data']['id']} 712 Set To Dictionary ${USERS.users['${username}'].bidresponses['bid'].data} id=${reply['data']['id']}
709 - Log ${reply} 713 + Log ${reply_active}
710 [return] ${reply} 714 [return] ${reply}
711 715
712 716
@@ -268,6 +268,7 @@ def test_bid_data(): @@ -268,6 +268,7 @@ def test_bid_data():
268 }) 268 })
269 bid.data.tenderers[0].address.countryName_en = translate_country_en(bid.data.tenderers[0].address.countryName) 269 bid.data.tenderers[0].address.countryName_en = translate_country_en(bid.data.tenderers[0].address.countryName)
270 bid.data.tenderers[0].address.countryName_ru = translate_country_ru(bid.data.tenderers[0].address.countryName) 270 bid.data.tenderers[0].address.countryName_ru = translate_country_ru(bid.data.tenderers[0].address.countryName)
  271 + bid.data['status'] = 'draft'
271 return bid 272 return bid
272 273
273 274
Please register or login to post a comment