Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed May 10, 2016
1 parent dbad704 commit 9d03a8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions openprocurement/tender/limited/tests/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ def setUp(self):
self.award_id = award['id']
response = self.app.patch_json('/tenders/{}/awards/{}?acc_token={}'.format(self.tender_id, self.award_id, self.tender_token), {"data": {"status": "active"}})

@unittest.skipUnless(SANDBOX_MODE, "not supported accelerator")
def test_create_tender_contract_negotination_quick(self):
response = self.app.get('/tenders/{}/contracts'.format(self.tender_id))
self.contract_id = response.json['data'][0]['id']
Expand Down
8 changes: 5 additions & 3 deletions openprocurement/tender/limited/tests/tender.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ def test_create_tender_generated(self):
tender = response.json['data']
fields = [u'id', u'dateModified', u'tenderID', u'status', u'items',
u'value', u'procuringEntity', u'owner', u'procurementMethod',
u'procurementMethodType', u'title', u'procurementMethodDetails']
u'procurementMethodType', u'title']
if u'procurementMethodDetails' in self.initial_data:
fields.append(u'procurementMethodDetails')
if "negotiation" == self.initial_data['procurementMethodType']:
fields.append(u'cause')
if "negotiation" in self.initial_data['procurementMethodType']:
Expand Down Expand Up @@ -570,9 +572,9 @@ def test_create_tender(self):
tender_set = set(tender)
if 'procurementMethodDetails' in tender_set:
tender_set.remove('procurementMethodDetails')
if u'cause' in tender_set:
if "negotiation" == self.initial_data['procurementMethodType']:
tender_set.remove(u'cause')
if u'causeDescription' in tender_set:
if "negotiation" in self.initial_data['procurementMethodType']:
tender_set.remove(u'causeDescription')
self.assertEqual(tender_set - set(test_tender_data), set(
[u'id', u'dateModified', u'owner', u'tenderID', u'status', u'procurementMethod']))
Expand Down

0 comments on commit 9d03a8d

Please sign in to comment.