Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Apr 11, 2016
2 parents 4d9c03c + e461974 commit 2c67755
Show file tree
Hide file tree
Showing 18 changed files with 154 additions and 71 deletions.
Binary file modified docs/source/locale/uk/LC_MESSAGES/qualification.mo
Binary file not shown.
82 changes: 57 additions & 25 deletions docs/source/locale/uk/LC_MESSAGES/qualification.po
Expand Up @@ -4,16 +4,16 @@ msgstr ""
"Project-Id-Version: openprocurement.api 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-10-29 12:11+0200\n"
"PO-Revision-Date: 2016-03-14 15:48+0200\n"
"PO-Revision-Date: 2016-04-07 13:18+0300\n"
"Last-Translator: Zoriana Zaiats <sorenabell@quintagroup.com>\n"
"Language-Team: Ukrainian <info@quintagroup.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk\n"
"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<"
"=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 1.5\n"

#: ../../source/qualification.rst:5
msgid "Qualification Operations"
Expand Down Expand Up @@ -53,26 +53,6 @@ msgstr "Підтвердження визначення переможця:"
msgid "Influence of Complaint Satisfaction"
msgstr "Вплив задовільненої скарги"

#: ../../source/qualification.rst:112
msgid ""
"If decision of the procuring entity is considered unfair any bidder can file"
" complaint and after proper review the whole awarding process can start from"
" the award in question. When Complaint Review Body satifies the complaint, "
"all awards registered in the system that were issued (including the one that"
" complaint was filed against) are cancelled (switch to `cancelled` status). "
"New pending award is generated and Procuring Entity is obliged to qualify it"
" again, taking into consideration recommendations in the report of Complaint"
" Review Body."
msgstr ""
"Якщо рішення замовника вважатиметься несправедливим, будь-який учасник може "
"подати скаргу і, після її відповідного розгляду, весь процес визначення "
"переможця може вернутись до цього рішення. Коли орган розгляду скарг "
"задовільнить скаргу, всі рішення зареєстровані в системі (включно з тим, "
"проти якого подана скарга) відміняються (отримують статус `cancelled`). "
"Генерується новий процес визначення переможця і Замовник зобов’язаний "
"кваліфікувати його знову, зважаючи на рекомендації зазначені в звіті органу "
"розгляду скарг."

#: ../../source/qualification.rst:80
msgid "Cancelling Active Award"
msgstr "Скасування активної винагороди"
Expand Down Expand Up @@ -173,7 +153,59 @@ msgid ""
msgstr ""
"Кваліфікаційний комітет може завантажити декілька документів, наприклад, "
"рішення подовжити процес кваліфікації, щоб дозволити кандидату зібрати усі "
"необхідні документи або виправити помилки. Такі документи допоможуть зробити "
"процедуру прозорою та зменшать ймовірність відміни рішення органом розгляду "
"скарг."
"необхідні документи або виправити помилки. Такі документи допоможуть зробити"
" процедуру прозорою та зменшать ймовірність відміни рішення органом розгляду"
" скарг."

#: ../../source/qualification.rst:116
msgid ""
"Disqualification decision of procuring entity's qualification committee can "
"be cancelled in the following cases:"
msgstr ""
"Рішення кваліфікаційної комісії замовника про дискваліфікацію можна "
"відмінити у таких випадках:"

#: ../../source/qualification.rst:118
msgid ""
"claim for this disqualification has been submitted (claim status is "
"``claim``);"
msgstr "подана вимога на цю дискваліфікацію (статус вимоги ``claim``);"

#: ../../source/qualification.rst:119
msgid "claim has been answered (claim status is ``answered``);"
msgstr "надана відповідь по вимозі (статус вимоги ``answered``);"

#: ../../source/qualification.rst:120
msgid "complaint is pending review (complaint status is ``pending``);"
msgstr "скарга очікує розгляду органом оскарження (статус скарги ``pending``);"

#: ../../source/qualification.rst:121
msgid ""
"complaint has been satisfied by the Complaint Review Body (complaint status "
"is ``resolved``)."
msgstr ""
"скарга задовільнена, тобто є позитивне рішення органу оскарження (статус "
"скарги ``resolved``)."

#: ../../source/qualification.rst:112
msgid ""
"If decision of the procuring entity is unfair any bidder can file complaint "
"and after proper review the whole awarding process can start from the award "
"in question."
msgstr ""
"Якщо рішення замовника є несправедливим, будь-який учасник може подати скаргу "
"і, після її відповідного розгляду, весь процес визначення переможця може "
"вернутись до цього рішення."

#: ../../source/qualification.rst:123
msgid ""
"After the disqualification decision cancellation it receives ``cancelled`` "
"status. New pending award is generated and procuring entity is obliged to "
"qualify it again (taking into consideration recommendations from the report "
"of Complaint Review Body if there is one)."
msgstr ""
"При відміні рішення про дискваліфікацію воно отримує статус ``cancelled``. "
"Генерується новий процес визначення переможця і замовник зобов’язаний "
"кваліфікувати його знову (зважаючи на рекомендації зазначені в звіті органу "
"розгляду скарг, якщо такий є)."

Binary file modified docs/source/locale/uk/LC_MESSAGES/standard/document.mo
Binary file not shown.
Binary file modified docs/source/locale/uk/LC_MESSAGES/standard/feature.mo
Binary file not shown.
6 changes: 3 additions & 3 deletions docs/source/locale/uk/LC_MESSAGES/standard/feature.po
@@ -1,11 +1,10 @@
#
# Zoriana Zaiats <sorenabell@quintagroup.com>, 2016.
msgid ""
msgstr ""
"Project-Id-Version: openprocurement.api 0.8.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-12 13:39+0300\n"
"PO-Revision-Date: 2016-03-09 15:02+0200\n"
"PO-Revision-Date: 2016-04-01 11:41+0300\n"
"Last-Translator: Zoriana Zaiats <sorenabell@quintagroup.com>\n"
"Language-Team: Ukrainian <info@quintagroup.com>\n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -38,7 +37,7 @@ msgstr "Можливі значення:"

#: ../../source/standard/feature.rst:24
msgid "`tenderer`"
msgstr "`tenderer`"
msgstr "`tenderer` - учасник закупівлі"

#: ../../source/standard/feature.rst:26
msgid "`item`"
Expand Down Expand Up @@ -100,3 +99,4 @@ msgstr "`lot`"
msgid "string, auto-generated"
msgstr "рядок, генерується автоматично"


18 changes: 11 additions & 7 deletions docs/source/qualification.rst
Expand Up @@ -109,14 +109,18 @@ Location header in the response pointing to its Award.
Influence of Complaint Satisfaction
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If decision of the procuring entity is considered unfair any bidder can file
If decision of the procuring entity is unfair any bidder can file
complaint and after proper review the whole awarding process can start from
the award in question. When Complaint Review Body satifies the complaint,
all awards registered in the system that were issued (including the one that
complaint was filed against) are cancelled (switch to `cancelled` status).
New pending award is generated and Procuring Entity is obliged to qualify it
again, taking into consideration recommendations in the report of Complaint
Review Body.
the award in question.

Disqualification decision of procuring entity's qualification committee can be cancelled in the following cases:

* claim for this disqualification has been submitted (claim status is ``claim``);
* claim has been answered (claim status is ``answered``);
* complaint is pending review (complaint status is ``pending``);
* complaint has been satisfied by the Complaint Review Body (complaint status is ``resolved``).

After the disqualification decision cancellation it receives ``cancelled`` status. New pending award is generated and procuring entity is obliged to qualify it again (taking into consideration recommendations from the report of Complaint Review Body if there is one).

.. include:: qualification/awards-unsuccessful-get1.http
:code:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -40,7 +40,7 @@
}

setup(name='openprocurement.api',
version='2.2',
version='2.2.1',
description='openprocurement.api',
long_description=README,
classifiers=[
Expand Down
5 changes: 1 addition & 4 deletions src/openprocurement/api/models.py
Expand Up @@ -1279,10 +1279,7 @@ def validate_awardPeriod(self, data, period):
raise ValidationError(u"period should begin after auctionPeriod")
if period and period.startDate and data.get('tenderPeriod') and data.get('tenderPeriod').endDate and period.startDate < data.get('tenderPeriod').endDate:
raise ValidationError(u"period should begin after tenderPeriod")

def validate_lots(self, data, value):
if len(value) == 1 and data['guarantee']:
lot = value[0]
if lot.guarantee and lot.guarantee.currency != data['guarantee'].currency:
raise ValidationError(u"lot guarantee currency should be identical to tender guarantee currency")
if len(set([lot.guarantee.currency for lot in value if lot.guarantee])) > 1:
raise ValidationError(u"lot guarantee currency should be identical to tender guarantee currency")
6 changes: 3 additions & 3 deletions src/openprocurement/api/tests/auth.py
Expand Up @@ -32,7 +32,7 @@ def test_create_tender_accreditation(self):
response = self.app.post_json('/tenders', {"data": test_tender_data}, status=403)
self.assertEqual(response.status, '403 Forbidden')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['errors'][0]["description"], "Accreditation not allows to create tender")
self.assertEqual(response.json['errors'][0]["description"], "Broker Accreditation level does not permit tender creation")


class AccreditationTenderQuestionTest(BaseTenderWebTest):
Expand All @@ -50,7 +50,7 @@ def test_create_tender_question_accreditation(self):
status=403)
self.assertEqual(response.status, '403 Forbidden')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['errors'][0]["description"], "Accreditation not allows to create question")
self.assertEqual(response.json['errors'][0]["description"], "Broker Accreditation level does not permit question creation")


class AccreditationTenderBidTest(BaseTenderWebTest):
Expand All @@ -70,7 +70,7 @@ def test_create_tender_bid_accreditation(self):
status=403)
self.assertEqual(response.status, '403 Forbidden')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['errors'][0]["description"], "Accreditation not allows to create bid")
self.assertEqual(response.json['errors'][0]["description"], "Broker Accreditation level does not permit bid creation")



Expand Down
6 changes: 2 additions & 4 deletions src/openprocurement/api/tests/bidder.py
Expand Up @@ -276,10 +276,8 @@ def test_delete_tender_bidder(self):
self.assertEqual(response.json['data'], bidder)

revisions = self.db.get(self.tender_id).get('revisions')
self.assertEqual(revisions[-2][u'changes'][-1]['op'], u'remove')
self.assertEqual(revisions[-2][u'changes'][-1]['path'], u'/bids')
self.assertEqual(revisions[-1][u'changes'][-1]['op'], u'add')
self.assertEqual(revisions[-1][u'changes'][-1]['path'], u'/bids')
self.assertTrue(any([i for i in revisions[-2][u'changes'] if i['op'] == u'remove' and i['path'] == u'/bids']))
self.assertTrue(any([i for i in revisions[-1][u'changes'] if i['op'] == u'add' and i['path'] == u'/bids']))

response = self.app.delete('/tenders/{}/bids/some_id'.format(self.tender_id), status=404)
self.assertEqual(response.status, '404 Not Found')
Expand Down
34 changes: 19 additions & 15 deletions src/openprocurement/api/tests/lot.py
Expand Up @@ -502,23 +502,27 @@ def test_delete_tender_lot(self):

def test_tender_lot_guarantee(self):
data = deepcopy(test_tender_data)
data['guarantee'] = {"amount": 100, "currency": "GBP"}
data['guarantee'] = {"amount": 100, "currency": "USD"}
response = self.app.post_json('/tenders', {'data': data})
tender = response.json['data']
self.assertEqual(response.status, '201 Created')
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 100)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")
self.assertEqual(response.json['data']['guarantee']['currency'], "USD")

lot = deepcopy(test_lots[0])
lot['guarantee'] = {"amount": 20, "currency": "USD"}
response = self.app.post_json('/tenders/{}/lots'.format(tender['id']), {'data': lot}, status=422)
self.assertEqual(response.status, '422 Unprocessable Entity')
self.assertEqual(response.content_type, 'application/json')
self.assertEqual(response.json['status'], 'error')
self.assertEqual(response.json['errors'], [
{u'description': [u'lot guarantee currency should be identical to tender guarantee currency'], u'location': u'body', u'name': u'lots'}
])
response = self.app.post_json('/tenders/{}/lots'.format(tender['id']), {'data': lot})
self.assertEqual(response.status, '201 Created')
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 20)
self.assertEqual(response.json['data']['guarantee']['currency'], "USD")

response = self.app.patch_json('/tenders/{}'.format(tender['id']), {'data': {'guarantee': {"currency": "GBP"}}})
self.assertEqual(response.status, '200 OK')
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 20)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

lot['guarantee'] = {"amount": 20, "currency": "GBP"}
response = self.app.post_json('/tenders/{}/lots'.format(tender['id']), {'data': lot})
Expand All @@ -528,7 +532,7 @@ def test_tender_lot_guarantee(self):
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertEqual(response.json['data']['guarantee']['amount'], 20)
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 20)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

lot2 = deepcopy(test_lots[0])
Expand All @@ -550,11 +554,11 @@ def test_tender_lot_guarantee(self):

response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 30)
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 20 + 30)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

response = self.app.patch_json('/tenders/{}'.format(tender['id']), {"data": {"guarantee": {"amount": 55}}})
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 30)
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 20 + 30)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

response = self.app.patch_json('/tenders/{}/lots/{}'.format(tender['id'], lot2_id), {'data': {'guarantee': {"amount": 35, "currency": "GBP"}}})
Expand All @@ -563,7 +567,7 @@ def test_tender_lot_guarantee(self):

response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 35)
self.assertEqual(response.json['data']['guarantee']['amount'], 20 + 20 + 35)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

for l_id in (lot_id, lot2_id):
Expand All @@ -573,7 +577,7 @@ def test_tender_lot_guarantee(self):

response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 0)
self.assertEqual(response.json['data']['guarantee']['amount'], 20)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")

for l_id in (lot_id, lot2_id):
Expand All @@ -582,7 +586,7 @@ def test_tender_lot_guarantee(self):

response = self.app.get('/tenders/{}'.format(tender['id']))
self.assertIn('guarantee', response.json['data'])
self.assertEqual(response.json['data']['guarantee']['amount'], 0)
self.assertEqual(response.json['data']['guarantee']['amount'], 20)
self.assertEqual(response.json['data']['guarantee']['currency'], "GBP")


Expand Down
19 changes: 18 additions & 1 deletion src/openprocurement/api/tests/tender.py
Expand Up @@ -823,8 +823,25 @@ def test_patch_tender(self):
self.assertEqual(response.status, '200 OK')
self.assertEqual(response.content_type, 'application/json')

import random
response = self.app.patch_json('/tenders/{}'.format(tender['id']), {'data': {'items': [{"additionalClassifications": [
tender['items'][0]["additionalClassifications"][0] for i in range(3)
{
"scheme": "ДКПП",
"id": "{}".format(i),
"description": "description #{}".format(i)
}
for i in random.sample(range(30), 25)
]}]}})
self.assertEqual(response.status, '200 OK')
self.assertEqual(response.content_type, 'application/json')

response = self.app.patch_json('/tenders/{}'.format(tender['id']), {'data': {'items': [{"additionalClassifications": [
{
"scheme": "ДКПП",
"id": "{}".format(i),
"description": "description #{}".format(i)
}
for i in random.sample(range(30), 20)
]}]}})
self.assertEqual(response.status, '200 OK')
self.assertEqual(response.content_type, 'application/json')
Expand Down
2 changes: 1 addition & 1 deletion src/openprocurement/api/utils.py
Expand Up @@ -742,7 +742,7 @@ def fix_url(item, app_url):


def beforerender(event):
if event.rendering_val and 'data' in event.rendering_val:
if event.rendering_val and isinstance(event.rendering_val, dict) and 'data' in event.rendering_val:
fix_url(event.rendering_val['data'], event['request'].application_url)


Expand Down

0 comments on commit 2c67755

Please sign in to comment.