Skip to content

Commit

Permalink
Complaints for openua
Browse files Browse the repository at this point in the history
  • Loading branch information
kroman0 committed Jan 18, 2016
1 parent 1f6808b commit 478417f
Show file tree
Hide file tree
Showing 6 changed files with 971 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[run]
omit =
*tests*

[report]
exclude_lines =
pragma: no cover
def __repr__
raise NotImplementedError
if __name__ == .__main__.:
13 changes: 13 additions & 0 deletions openprocurement/tender/openua/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from schematics.transforms import whitelist
from openprocurement.api.models import Tender as BaseTender
from openprocurement.api.models import Bid as BaseBid
from openprocurement.api.models import Complaint as BaseComplaint
from openprocurement.api.models import Award as BaseAward
from openprocurement.api.models import (
plain_role, create_role, edit_role, cancel_role, view_role, listing_role,
auction_view_role, auction_post_role, auction_patch_role, enquiries_role,
Expand All @@ -13,6 +15,7 @@
from openprocurement.tender.openua.interfaces import ITenderUA
from schematics.exceptions import ConversionError, ValidationError


def bids_validation_wrapper(validation_func):
def validator(klass, data, value):
if data['status'] in ('deleted', 'invalidBid'):
Expand Down Expand Up @@ -123,6 +126,14 @@ def validate_parameters(self, data, parameters):
BaseBid._validator_functions['parameters'](self, data, parameters)


class Complaint(BaseComplaint):
pass


class Award(BaseAward):
complaints = ListType(ModelType(Complaint), default=list())


@implementer(ITenderUA)
class Tender(BaseTender):
"""Data regarding tender process - publicly inviting prospective contractors to submit bids for evaluation and selecting a winner or winners."""
Expand Down Expand Up @@ -160,6 +171,8 @@ class Options:
__name__ = ''

bids = SifterListType(ModelType(Bid), default=list(), filter_by='status', filter_in_values=['invalidBid', 'deleted']) # A list of all the companies who entered submissions for the tender.
awards = ListType(ModelType(Award), default=list())
complaints = ListType(ModelType(Complaint), default=list())
procurementMethodType = StringType(default="aboveThresholdUA")
status = StringType(choices=['active.tendering', 'active.auction', 'active.qualification', 'active.awarded', 'complete', 'cancelled', 'unsuccessful'], default='active.tendering')

Expand Down
3 changes: 3 additions & 0 deletions openprocurement/tender/openua/tests/auth.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ chrisr = chrisr
broker = broker
broker05 = broker05

[reviewers]
reviewer = reviewer

[admins]
test = token
Loading

0 comments on commit 478417f

Please sign in to comment.