Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract local role contract_supplier for signing #7

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openprocurement/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ class Contract(Model):
description = StringType() # Contract description
description_en = StringType()
description_ru = StringType()
status = StringType(choices=["pending", "terminated", "active", "cancelled"], default="pending")
status = StringType(choices=["pending", "pending.winner-signing", "terminated", "active", "cancelled"], default="pending")
period = ModelType(Period)
value = ModelType(Value)
dateSigned = IsoDateTimeType()
Expand Down
36 changes: 33 additions & 3 deletions src/openprocurement/tender/belowthreshold/tests/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@
lot2_patch_tender_contract_document,
patch_tender_contract_value_vat_not_included,
patch_tender_contract_value,
patch_tender_contract_status_by_owner,
patch_tender_contract_status_by_supplier,
patch_tender_contract_status_by_others,
create_tender_contract_document_by_supplier,
create_tender_contract_document_by_others,
put_tender_contract_document_by_supplier,
put_tender_contract_document_by_others,
patch_tender_contract_document_by_supplier,
lot2_create_tender_contract_document_by_supplier,
lot2_create_tender_contract_document_by_others,
lot2_put_tender_contract_document_by_supplier,
lot2_patch_tender_contract_document_by_supplier,
)


Expand Down Expand Up @@ -82,6 +94,9 @@ def setUp(self):
test_create_tender_contract_in_complete_status = snitch(create_tender_contract_in_complete_status)
test_patch_tender_contract = snitch(patch_tender_contract)
test_patch_tender_contract_value = snitch(patch_tender_contract_value)
test_patch_tender_contract_status_by_owner = snitch(patch_tender_contract_status_by_owner)
test_patch_tender_contract_status_by_supplier = snitch(patch_tender_contract_status_by_supplier)
test_patch_tender_contract_status_by_others = snitch(patch_tender_contract_status_by_others)


class TenderContractVATNotIncludedResourceTest(TenderContentWebTest, TenderContractResourceTestMixin):
Expand Down Expand Up @@ -119,6 +134,9 @@ def setUp(self):
self.create_award()

test_patch_tender_contract_value_vat_not_included = snitch(patch_tender_contract_value_vat_not_included)
test_patch_tender_contract_status_by_owner = snitch(patch_tender_contract_status_by_owner)
test_patch_tender_contract_status_by_supplier = snitch(patch_tender_contract_status_by_supplier)
test_patch_tender_contract_status_by_others = snitch(patch_tender_contract_status_by_others)


class Tender2LotContractResourceTest(TenderContentWebTest):
Expand Down Expand Up @@ -189,6 +207,12 @@ def setUp(self):
self.contract_id = contract["id"]
self.app.authorization = auth

test_create_tender_contract_document_by_supplier = snitch(create_tender_contract_document_by_supplier)
test_create_tender_contract_document_by_others = snitch(create_tender_contract_document_by_others)
test_put_tender_contract_document_by_supplier = snitch(put_tender_contract_document_by_supplier)
test_put_tender_contract_document_by_others = snitch(put_tender_contract_document_by_others)
test_patch_tender_contract_document_by_supplier = snitch(patch_tender_contract_document_by_supplier)


class Tender2LotContractDocumentResourceTest(TenderContentWebTest):
initial_status = "active.qualification"
Expand Down Expand Up @@ -231,15 +255,21 @@ def setUp(self):
self.contract_id = contract["id"]
self.app.authorization = auth

lot2_create_tender_contract_document = snitch(lot2_create_tender_contract_document)
lot2_put_tender_contract_document = snitch(lot2_put_tender_contract_document)
lot2_patch_tender_contract_document = snitch(lot2_patch_tender_contract_document)
test_lot2_create_tender_contract_document = snitch(lot2_create_tender_contract_document)
test_lot2_put_tender_contract_document = snitch(lot2_put_tender_contract_document)
test_lot2_patch_tender_contract_document = snitch(lot2_patch_tender_contract_document)
test_lot2_create_tender_contract_document_by_supplier = snitch(lot2_create_tender_contract_document_by_supplier)
test_lot2_create_tender_contract_document_by_others = snitch(lot2_create_tender_contract_document_by_others)
test_lot2_put_tender_contract_document_by_supplier = snitch(lot2_put_tender_contract_document_by_supplier)
test_lot2_patch_tender_contract_document_by_supplier = snitch(lot2_patch_tender_contract_document_by_supplier)


def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TenderContractResourceTest))
suite.addTest(unittest.makeSuite(TenderContractDocumentResourceTest))
suite.addTest(unittest.makeSuite(TenderContractVATNotIncludedResourceTest))
suite.addTest(unittest.makeSuite(Tender2LotContractDocumentResourceTest))
return suite


Expand Down
Loading