Skip to content

Commit

Permalink
Merge pull request #56 from gorserg/add_contract_tests
Browse files Browse the repository at this point in the history
add tests for contract
  • Loading branch information
kroman0 committed Aug 10, 2016
2 parents 6355a7b + b181dc5 commit e53f16a
Show file tree
Hide file tree
Showing 3 changed files with 1,447 additions and 3 deletions.
31 changes: 30 additions & 1 deletion openprocurement/tender/competitivedialogue/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,36 @@ def set_status(self, status, extra=None):
"startDate": (now).isoformat(),
}
})
elif status == 'active.qualification':
data.update({
"enquiryPeriod": {
"startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL - timedelta(days=2)).isoformat(),
"endDate": (now - QUESTIONS_STAND_STILL - COMPLAINT_STAND_STILL - timedelta(days=1)).isoformat()
},
"tenderPeriod": {
"startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL - timedelta(days=2)).isoformat(),
"endDate": (now - COMPLAINT_STAND_STILL - timedelta(days=1)).isoformat()
},
"auctionPeriod": {
"startDate": (now - timedelta(days=1)).isoformat(),
"endDate": (now).isoformat()
},
"awardPeriod": {
"startDate": (now).isoformat()
}
})
if self.initial_lots:
data.update({
'lots': [
{
"auctionPeriod": {
"startDate": (now - timedelta(days=1)).isoformat(),
"endDate": (now).isoformat()
}
}
for i in self.initial_lots
]
})
elif status == 'active.pre-qualification.stand-still':
data.update({
"enquiryPeriod": {
Expand Down Expand Up @@ -397,7 +427,6 @@ def set_status(self, status, extra=None):
"startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL - timedelta(days=4)).isoformat(),
"endDate": (now - COMPLAINT_STAND_STILL - timedelta(days=3)).isoformat()
},
# TODO: remove auctionPeriod, because we didn't have action in dialog
"auctionPeriod": {
"startDate": (now - timedelta(days=3)).isoformat(),
"endDate": (now - timedelta(days=2)).isoformat()
Expand Down

0 comments on commit e53f16a

Please sign in to comment.