Skip to content

Commit

Permalink
removed redundant rows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Manko committed May 11, 2020
1 parent 80d3314 commit b84a5ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from webtest import AppError
import mock
import dateutil.parser

from openprocurement.api.utils import get_now
from openprocurement.api.constants import RELEASE_2020_04_19
from openprocurement.tender.core.tests.cancellation import activate_cancellation_after_2020_04_19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from openprocurement.tender.belowthreshold.tests.base import test_claim, test_cancellation, test_tender_data, test_organization, test_tender_full_document_data
from openprocurement.tender.core.tests.cancellation import activate_cancellation_after_2020_04_19


# TenderContractResourceTest
from openprocurement.api.constants import RELEASE_2020_04_19

Expand Down Expand Up @@ -865,6 +864,7 @@ def not_found(self):
self.assertEqual(
response.json["errors"], [{u"description": u"Not Found", u"location": u"url", u"name": u"tender_id"}]
)

response = self.app.get("/tenders/{}/contracts/some_id/documents".format(self.tender_id), status=404)
self.assertEqual(response.status, "404 Not Found")
self.assertEqual(response.content_type, "application/json")
Expand Down Expand Up @@ -1061,6 +1061,7 @@ def create_tender_contract_document(self):
)
self.assertEqual(response.status, "403 Forbidden")
self.assertEqual(response.content_type, "application/json")

self.assertEqual(
response.json["errors"][0]["description"],
"Can't add document in current ({}) tender status".format(
Expand Down Expand Up @@ -1121,16 +1122,14 @@ def create_tender_contract_document_by_supplier(self):
self.assertEqual(response.json["errors"],
[{u'description': u"Supplier can't add document in current contract status",
u'location': u'body',
u'name': u'data'}])

u'name': u'data'}])
# Tender owner
response = self.app.patch_json(
"/tenders/{}/contracts/{}?acc_token={}".format(self.tender_id, self.contract_id, self.tender_token),
{"data": {"status": "pending.winner-signing"}}
)
self.assertEqual(response.status, "200 OK")
self.assertEqual(response.json["data"]["status"], "pending.winner-signing")

self.assertEqual(response.json["data"]["status"], "pending.winner-signing")

# Supplier
response = self.app.post(
Expand Down Expand Up @@ -1543,7 +1542,6 @@ def put_tender_contract_document_by_supplier(self):
response = self.app.get("/tenders/{}/contracts/{}".format(self.tender_id, self.contract_id))
contract = response.json["data"]
self.assertEqual(response.json["data"]["status"], "pending")

doc = self.db.get(self.tender_id)
bid_id = jmespath.search("awards[?id=='{}'].bid_id".format(contract["awardID"]), doc)[0]
bid_token = jmespath.search("bids[?id=='{}'].owner_token".format(bid_id), doc)[0]
Expand Down Expand Up @@ -2306,6 +2304,7 @@ def lot2_create_tender_contract_document_by_supplier(self):
)
self.assertEqual(response.status, "200 OK")
self.assertEqual(response.json["data"]["status"], "pending.winner-signing")

# Supplier
response = self.app.post(
"/tenders/{}/contracts/{}/documents?acc_token={}".format(self.tender_id, self.contract_id, bid_token),
Expand Down Expand Up @@ -2634,7 +2633,7 @@ def lot2_put_tender_contract_document_by_supplier(self):
)
self.assertEqual(response.status, "200 OK")
self.assertEqual(response.json["data"]["status"], "pending.winner-signing")

# Supplier
response = self.app.post_json(
"/tenders/{}/contracts/{}/documents?acc_token={}".format(self.tender_id, self.contract_id, bid_token),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,7 @@ def put_tender_contract_document(self):
),
)


def patch_tender_contract_document(self):
response = self.app.post(
"/tenders/{}/contracts/{}/documents?acc_token={}".format(self.tender_id, self.contract_id, self.tender_token),
Expand Down

0 comments on commit b84a5ab

Please sign in to comment.