Skip to content

Commit

Permalink
Merge bb5371f into d67ef6e
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiyVeretiuk committed Jun 21, 2018
2 parents d67ef6e + bb5371f commit 6690247
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions openprocurement/auctions/dgf/tests/blanks/tender_blanks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import unittest

from copy import deepcopy
from datetime import timedelta, time
from iso8601 import parse_date
Expand Down Expand Up @@ -846,3 +848,22 @@ def create_auction_generated_financial(self):
self.assertEqual(auction['eligibilityCriteria'], DGF_ELIGIBILITY_CRITERIA['ua'])
self.assertEqual(auction['eligibilityCriteria_en'], DGF_ELIGIBILITY_CRITERIA['en'])
self.assertEqual(auction['eligibilityCriteria_ru'], DGF_ELIGIBILITY_CRITERIA['ru'])


@unittest.skipIf(not SANDBOX_MODE, 'procurementMethodDetails is absent while SANDBOX_MODE is False')
def delete_procurementMethodDetails(self):
data = deepcopy(self.initial_data)
data['procurementMethodDetails'] = 'some procurementMethodDetails'

response = self.app.post_json('/auctions', {'data': data})
self.assertEqual(response.status, '201 Created')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['data']['procurementMethodDetails'], data['procurementMethodDetails'])
auction = response.json['data']

self.app.authorization = ('Basic', ('administrator', ''))
response = self.app.patch_json(
'/auctions/{}'.format(auction['id']),
{'data': {'procurementMethodDetails': None}}
)
self.assertNotIn('procurementMethodDetails', response.json['data'])
2 changes: 2 additions & 0 deletions openprocurement/auctions/dgf/tests/tender.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
create_auction_auctionPeriod,
create_auction_generated,
create_auction,
delete_procurementMethodDetails,
# AuctionProcessTest
first_bid_auction,
suspended_auction,
Expand Down Expand Up @@ -74,6 +75,7 @@ class AuctionResourceTest(BaseWebTest, AuctionResourceTestMixin, DgfInsiderResou
test_auction_features_invalid = unittest.skip("option not available")(snitch(auction_features_invalid))
test_auction_features = unittest.skip("option not available")(snitch(auction_features))
test_patch_tender_jsonpatch = snitch(patch_tender_jsonpatch)
test_delete_procurementMethodDetails = snitch(delete_procurementMethodDetails)


class AuctionProcessTest(BaseAuctionWebTest):
Expand Down

0 comments on commit 6690247

Please sign in to comment.