Skip to content

Commit

Permalink
Merge c9e6fc4 into 9b9eefe
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav committed Oct 2, 2017
2 parents 9b9eefe + c9e6fc4 commit a64af3a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openprocurement/tender/esco/tests/tender.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
tender_fundingKind_default,
items_without_deliveryDate_quantity,
tender_noticePublicationDate,
validate_items,
#TestTenderEU
create_tender_invalid,
patch_tender,
Expand All @@ -65,6 +66,7 @@ class TenderESCOTest(BaseESCOWebTest):
test_items_without_deliveryDate_quantity = snitch(items_without_deliveryDate_quantity)
test_tender_fundingKind_default = snitch(tender_fundingKind_default)
test_tender_noticePublicationDate = snitch(tender_noticePublicationDate)
test_validate_items = snitch(validate_items)


class TestTenderEU(BaseESCOContentWebTest, TenderResourceTestMixin, TenderUAResourceTestMixin):
Expand Down
16 changes: 16 additions & 0 deletions openprocurement/tender/esco/tests/tender_blanks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,3 +1244,19 @@ def tender_submission_method_details_no_auction_only(self):
self.assertEqual(response.status, '200 OK')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['data']['submissionMethodDetails'], "quick(mode:no-auction)")


def validate_items(self):
data = deepcopy(self.initial_data)
data["items"][0]["classification"]["id"] = u"92332000-7"
data["items"].append(deepcopy(data["items"][0]))
data["items"][1]["classification"]["id"] = u"92340000-6"
response = self.app.post_json("/tenders", {"data": data}, status=422)

self.assertEqual(response.status, '422 Unprocessable Entity')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['errors'], [
{u'description': [u'CPV class of items should be identical'],
u'location': u'body',
u'name': u'items'}
])

0 comments on commit a64af3a

Please sign in to comment.