forked from openprocurement/openprocurement.auctions.dgf
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Lot exposition minimal period validation (#22)
* feature * lot validation * request fixes * test auction cleanup * small fix * description fix * PEP8 fixes, code standart fixes, travis fix * PEP8 small fix, line added * acceleration_test fix, chronograph test fix * docs_acceleration_test fix, chronograph test fix * ukrainian translation for latest changes added
- Loading branch information
1 parent
c7273ae
commit 2b79396
Showing
12 changed files
with
165 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
POST /api/2.3/auctions?opt_pretty=1 HTTP/1.0 | ||
Authorization: Basic YnJva2VyOg== | ||
Content-Length: 2037 | ||
Content-Type: application/json | ||
Host: api-sandbox.ea.openprocurement.org | ||
|
||
{ | ||
"data": { | ||
"title": "футляри до державних нагород", | ||
"minimalStep": { | ||
"currency": "UAH", | ||
"amount": 35 | ||
}, | ||
"auctionPeriod": { | ||
"startDate": "2017-09-02T15:56:30.045984" | ||
}, | ||
"tenderAttempts": 1, | ||
"procurementMethodType": "dgfOtherAssets", | ||
"value": { | ||
"currency": "UAH", | ||
"amount": 100 | ||
}, | ||
"dgfID": "219560", | ||
"items": [ | ||
{ | ||
"description": "Земля для військовослужбовців", | ||
"classification": { | ||
"scheme": "CPV", | ||
"id": "66113000-5", | ||
"description": "Земельні ділянки" | ||
}, | ||
"address": { | ||
"countryName": "Україна", | ||
"postalCode": "79000", | ||
"region": "м. Київ", | ||
"streetAddress": "вул. Банкова 1", | ||
"locality": "м. Київ" | ||
}, | ||
"contractPeriod": { | ||
"startDate": "2017-08-30T15:56:30.043635", | ||
"endDate": "2017-09-02T15:56:30.043635" | ||
}, | ||
"unit": { | ||
"code": "44617100-9", | ||
"name": "item" | ||
}, | ||
"quantity": 5.001 | ||
} | ||
], | ||
"procuringEntity": { | ||
"contactPoint": { | ||
"name": "Державне управління справами", | ||
"telephone": "0440000000" | ||
}, | ||
"identifier": { | ||
"scheme": "UA-EDR", | ||
"id": "00037256", | ||
"uri": "http://www.dus.gov.ua/" | ||
}, | ||
"name": "Державне управління справами", | ||
"address": { | ||
"countryName": "Україна", | ||
"postalCode": "01220", | ||
"region": "м. Київ", | ||
"streetAddress": "вул. Банкова, 11, корпус 1", | ||
"locality": "м. Київ" | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
422 Unprocessable Entity | ||
Content-Type: application/json; charset=UTF-8 | ||
|
||
{ | ||
"status": "error", | ||
"errors": [ | ||
{ | ||
"description": [ | ||
"tenderPeriod should be greater than 6 days" | ||
], | ||
"location": "body", | ||
"name": "tenderPeriod" | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- coding: utf-8 -*- | ||
from datetime import datetime, timedelta, time, date | ||
from openprocurement.api.models import (TZ) | ||
|
||
|
||
MINIMAL_EXPOSITION_PERIOD = timedelta(days=7) | ||
MINIMAL_EXPOSITION_REQUIRED_FROM = datetime(2017, 8, 10, tzinfo=TZ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters