Commit 62c1946a6ce97bd6506fe4bfcf9ce19052517a9d
1 parent
43922dbb
generate guarantee criteria data and response
Showing
2 changed files
with
40 additions
and
1 deletions
| ... | ... | @@ -189,6 +189,10 @@ def test_tender_data(params, |
| 189 | 189 | "currency": u"UAH", |
| 190 | 190 | "valueAddedTaxIncluded": vat_included |
| 191 | 191 | }, |
| 192 | + "guarantee": { | |
| 193 | + "amount": value_amount * 0.75, | |
| 194 | + "currency": u"UAH", | |
| 195 | + }, | |
| 192 | 196 | "minimalStep": { |
| 193 | 197 | "amount": round(random.uniform(0.005, 0.03) * value_amount, 2), |
| 194 | 198 | "currency": u"UAH", |
| ... | ... | @@ -1307,6 +1311,12 @@ def test_bid_criteria(tender_data, criteria_len, bid_data, bid_document): |
| 1307 | 1311 | mock["evidences"][0]["relatedDocument"]["id"] = bid_document["data"]["id"] |
| 1308 | 1312 | mock["evidences"][0]["relatedDocument"]["title"] = bid_document["data"]["title"] |
| 1309 | 1313 | bid.data.append(mock) |
| 1314 | + elif criteria.get('source') == 'winner': | |
| 1315 | + for requirement in criteria['requirementGroups'][0]['requirements']: | |
| 1316 | + mock = deepcopy(mock) | |
| 1317 | + mock["requirement"]["id"] = requirement["id"] | |
| 1318 | + mock["requirement"]["title"] = requirement["title"] | |
| 1319 | + bid.data.append(mock) | |
| 1310 | 1320 | else: |
| 1311 | 1321 | pass |
| 1312 | 1322 | return bid |
| ... | ... | @@ -1370,3 +1380,31 @@ def test_awards_criteria(tender_data, award_document): |
| 1370 | 1380 | else: |
| 1371 | 1381 | pass |
| 1372 | 1382 | return bid |
| 1383 | + | |
| 1384 | + | |
| 1385 | +def test_data_contract_criteria_response(): | |
| 1386 | + return munchify({ | |
| 1387 | + "data": { | |
| 1388 | + "title": "виконання умог договору", | |
| 1389 | + "description": "документ, що підтверджує забезпечення виконання умов договору", | |
| 1390 | + "type": "document", | |
| 1391 | + "relatedDocument": { | |
| 1392 | + "id": "", | |
| 1393 | + "title": "" | |
| 1394 | + } | |
| 1395 | + } | |
| 1396 | + }) | |
| 1397 | + | |
| 1398 | + | |
| 1399 | +def test_contract_criteria_response_data(bid_doc_id, bid_doc_title): | |
| 1400 | + return munchify({ | |
| 1401 | + "data": { | |
| 1402 | + "title": "виконання умог договору", | |
| 1403 | + "description": "документ, що підтверджує забезпечення виконання умов договору", | |
| 1404 | + "type": "document", | |
| 1405 | + "relatedDocument": { | |
| 1406 | + "id": bid_doc_id, | |
| 1407 | + "title": bid_doc_title | |
| 1408 | + } | |
| 1409 | + } | |
| 1410 | + }) | ... | ... |
| ... | ... | @@ -95,7 +95,8 @@ from .initial_data import ( |
| 95 | 95 | test_bid_criteria, |
| 96 | 96 | test_qualification_criteria, |
| 97 | 97 | test_awards_criteria, |
| 98 | - test_tender_data_simple_defense | |
| 98 | + test_tender_data_simple_defense, | |
| 99 | + test_contract_criteria_response_data | |
| 99 | 100 | ) |
| 100 | 101 | from barbecue import chef |
| 101 | 102 | from restkit import request | ... | ... |
Please
register
or
login
to post a comment