Skip to content

Commit

Permalink
add invalid tenderPeriod test
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaksymiv committed Feb 25, 2016
1 parent ad5a1f0 commit f5adfd5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions openprocurement/tender/limited/tests/tender.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
import unittest
from copy import deepcopy
from datetime import timedelta

from openprocurement.api import ROUTE_PREFIX
Expand Down Expand Up @@ -1137,6 +1138,14 @@ def test_tender_cancellation(self):
class TenderNegotiationProcessTest(TenderProcessTest):
initial_data = test_tender_negotiation_data

def test_tendering_period_invalid(self):
data = deepcopy(test_tender_negotiation_data)
data['tenderPeriod']['endDate'] = get_now().isoformat()
# create tender
response = self.app.post_json('/tenders', {"data": data}, status=422)
self.assertEqual(response.status, '422 Unprocessable Entity')
self.assertEqual("tenderPeriod should be greater than {} days".format(TENDER_STAND_STILL_DAYS), response.json['errors'][0]["description"][0])

def test_single_award_tender(self):
# empty tenders listing
response = self.app.get('/tenders')
Expand Down

0 comments on commit f5adfd5

Please sign in to comment.