Commit 4c97e64f10e7995f1d097e00eee3b56fa9d6e6bf

Authored by Taras Kozlovskyi
1 parent c2663893

Added active award

... ... @@ -58,9 +58,5 @@ def patch_tender_document(api, tender, doc_id):
58 58 return api.update_document(tender, doc_id, file)
59 59
60 60
61   -def let_active_award(api, tender):
62   - awards = api.get_awards(tender)
63   - print "----_____ WE GOT AN AWARDS _____----"
64   - award_id = [i['id'] for i in awards.data if i['status'] == 'pending'][0]
65   - active_award = munchify({"data": {"status": "active", "id": award_id}})
66   - award = api.patch_award(tender, active_award)
  61 +def create_approve_award_request_data(award_id):
  62 + return munchify({"data": {"status": "active", "id": award_id}})
... ...
... ... @@ -134,9 +134,7 @@ Wait to end of auction
134 134 Activate award
135 135 ${awards}= Call Method ${API} get_awards ${tender}
136 136 Log object data ${awards}
137   - # :FOR ${award} IN @{awards.data}
138   - # \
139   - # award_id = [i['id'] for i in awards.data if i['status'] == 'pending'][0]
140   - # active_award = munchify({"data": {"status": "active", "id": award_id}})
141   - # award = api.patch_award(tender, active_award)
142   - # write_yaml('award_active.yaml', award)
\ No newline at end of file
  137 + ${award_approve}= create_approve_award_request_data ${awards.data[0].id}
  138 + Log object data ${award_approve}
  139 + ${approved_award}= Call Method ${API} patch_award ${tender} ${award_approve}
  140 + Log object data ${approved_award}
... ...
Please register or login to post a comment