Skip to content

Commit

Permalink
Show contract structure after upload generated docs by rBot
Browse files Browse the repository at this point in the history
  • Loading branch information
VDigitall committed Oct 30, 2020
1 parent 0148ad5 commit 07442a4
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
GET /api/2.5/tenders/bc3a9016b29d4fed894cc62d3ff59680/contracts/4f7b2b4c16f24c66897d0d18d57c05f3 HTTP/1.0
Authorization: Bearer broker
Host: lb-api-sandbox.prozorro.gov.ua

Response: 200 OK
Content-Type: application/json; charset=UTF-8
{
"data": {
"status": "pending",
"documents": [
{
"dateModified": "2020-05-15T01:00:03+03:00",
"hash": "md5:00000000000000000000000000000000",
"format": "application/pdf",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/6dc1fe7be9c2414592768997663e5a7a?KeyID=a8968c46&Signature=peZGjdLOljmZMG1bYMz9mHkM54El741Dop%2F3LiD6UdTgFysrRj5gH%2Fzl38jrq1%252BWpKxlg1XrfrMzhHUUquz9Aw%253D%253D",
"author": "renderer_bots",
"documentOf": "document",
"datePublished": "2020-05-15T01:00:03+03:00",
"documentType": "contract",
"title": "Contract.pdf",
"relatedItem": "f77c2444fc6f47e1bb441a284cd344e6",
"id": "7e80ffcc469043b9873f87b0af303d21"
},
{
"dateModified": "2020-05-15T01:00:03+03:00",
"hash": "md5:00000000000000000000000000000000",
"format": "application/json",
"url": "http://public-docs-sandbox.prozorro.gov.ua/get/9e4d1c0b18cb48c7afc85a4e7acea0aa?KeyID=a8968c46&Signature=YD9Nxdzdct4TZKP2rcznflT7CNlYnWscEJNgMmAmvw0SzZrLFaptRbrvKjHiVUths8qMhHzMyNt%2FJluiTnV%2FBw%253D%253D",
"author": "renderer_bots",
"documentOf": "document",
"datePublished": "2020-05-15T01:00:03+03:00",
"documentType": "contractData",
"title": "ContractData.json",
"relatedItem": "7e80ffcc469043b9873f87b0af303d21",
"id": "bab91701c47a40499083fb2e3c2a4fea"
}
],
"items": [
{
"description": "футляри до державних нагород",
"classification": {
"scheme": "ДК021",
"description": "Cartons",
"id": "44617100-9"
},
"additionalClassifications": [
{
"scheme": "ДКПП",
"id": "17.21.1",
"description": "папір і картон гофровані, паперова й картонна тара"
}
],
"deliveryAddress": {
"postalCode": "79000",
"countryName": "Україна",
"streetAddress": "вул. Банкова 1",
"region": "м. Київ",
"locality": "м. Київ"
},
"deliveryDate": {
"startDate": "2020-05-17T01:00:00+03:00",
"endDate": "2020-05-20T01:00:00+03:00"
},
"id": "53de0c90af0e430ea270c5970351ba0c",
"unit": {
"code": "44617100-9",
"name": "item"
},
"quantity": 5.0
}
],
"suppliers": [
{
"contactPoint": {
"email": "[email protected]",
"telephone": "+380 (322) 91-69-30",
"name": "Андрій Олексюк"
},
"scale": "sme",
"name": "ДКП «Книга»",
"identifier": {
"scheme": "UA-EDR",
"id": "00137226",
"uri": "http://www.sc.gov.ua/"
},
"address": {
"postalCode": "79013",
"countryName": "Україна",
"streetAddress": "вул. Островського, 34",
"region": "Львівська область",
"locality": "м. Львів"
}
}
],
"contractNumber": "contract #13111",
"period": {
"startDate": "2020-05-15T01:00:03+03:00",
"endDate": "2021-05-15T01:00:03+03:00"
},
"dateSigned": "2020-05-15T01:00:03+03:00",
"value": {
"currency": "UAH",
"amount": 238.0,
"amountNet": 230.0,
"valueAddedTaxIncluded": true
},
"date": "2020-05-15T01:00:01+03:00",
"awardID": "898563864e114bff9ca304570bfc199e",
"id": "4f7b2b4c16f24c66897d0d18d57c05f3",
"contractID": "UA-2020-05-15-000001-1"
}
}

9 changes: 9 additions & 0 deletions docs/tests/test_belowthreshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,15 @@ def test_docs_tutorial(self):
self.assertEqual(response.status, '201 Created')
self.contract_contract_data_doc_id = response.json['data']['id']

#### Get contract generated documents

with open(TARGET_DIR + 'tutorial/tender-contract-with-generated-documents.http', 'w') as self.app.file_obj:
response = self.app.get("/tenders/{}/contracts/{}".format(self.tender_id, self.contract_id))
self.assertEqual(response.status, '200 OK')
self.assertEqual(len(response.json['data']['documents']), 2)
for index, doc_type in enumerate(('contract', 'contractData')):
self.assertEqual(response.json['data']['documents'][index]['documentType'], doc_type)
self.assertEqual(response.json['data']['documents'][index]['author'], 'renderer_bots')

# buyer upload fixed contract data
with open(TARGET_DIR + 'tutorial/tender-contract-fix-contract-data-document.http', 'w') as self.app.file_obj:
Expand Down

0 comments on commit 07442a4

Please sign in to comment.