Skip to content

Commit

Permalink
Merge branch 'a224682041144054_complaint_leave_unsatisfied'
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaksymiv committed Dec 5, 2016
2 parents 9a146e4 + 6b30832 commit 62495e5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/source/complaints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Tender Conditions Claims/Complaints
edge[style=bold];
accepted -> {declined,satisfied,stopped};
pending -> {accepted,invalid};
stopping -> {stopped,invalid};
stopping -> {stopped,invalid,declined};
edge[label="auction" style=dotted];
answered -> {declined,resolved,invalid};
}
Expand All @@ -64,7 +64,7 @@ Tender Qualification Complaints
{pending,accepted} -> stopping;
edge[style=bold];
pending -> {accepted,invalid};
stopping -> {stopped,invalid};
stopping -> {stopped,invalid,declined};
accepted -> {declined,satisfied,stopped};
}

Expand All @@ -89,7 +89,7 @@ Tender Award Complaints
{pending,accepted} -> stopping;
edge[style=bold];
pending -> {accepted,invalid};
stopping -> {stopped,invalid};
stopping -> {stopped,invalid,declined};
accepted -> {declined,satisfied,stopped};
}

Expand Down
11 changes: 10 additions & 1 deletion openprocurement/tender/competitivedialogue/databridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ def retry_patch_dialog_add_stage2_id(self):
extra=journal_context({"MESSAGE_ID": DATABRIDGE_CD_UNSUCCESSFUL_PATCH_STAGE2_ID,
"TENDER_ID": dialog['id']}))
self.competitive_dialogues_queue.put({"id": dialog['id']})
else:
data = {"id": dialog['stage2TenderID'],
"status": STAGE2_STATUS,
"dialogueID": dialog['id']}
self.dialogs_stage2_patch_queue.put(data)
gevent.sleep(0)

def patch_new_tender_status(self):
Expand Down Expand Up @@ -516,7 +521,7 @@ def retry_patch_new_tender_status(self):
except:
logger.warn("Can't patch tender stage2 id={0} with status {1}".format(patch_data['id'], patch_data['status']),
extra=journal_context({"MESSAGE_ID": DATABRIDGE_UNSUCCESSFUL_PATCH_NEW_TENDER_STATUS,
"TENDER_ID": path_data['id']}))
"TENDER_ID": patch_data['id']}))
self.competitive_dialogues_queue.put({"id": patch_data['dialogueID']})
gevent.sleep(0)

Expand Down Expand Up @@ -548,6 +553,10 @@ def retry_put_tender_stage2(self):
extra=journal_context({"MESSAGE_ID": DATABRIDGE_CREATE_ERROR,
"TENDER_ID": new_tender['dialogueID']}))
self.competitive_dialogues_queue.put({"id": new_tender['dialogueID']})
else:
dialog = {"id": new_tender['dialogueID'],
"stage2TenderID": new_tender['id']}
self.dialog_stage2_id_queue.put(dialog)
gevent.sleep(0)

def get_competitive_dialogue_forward(self):
Expand Down
10 changes: 10 additions & 0 deletions openprocurement/tender/competitivedialogue/tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,21 @@ def setUp(self):
super(BaseTenderWebTest, self).setUp()
if self.docservice:
self.setUpDS()
if self.initial_auth:
self.app.authorization = self.initial_auth
else:
self.app.authorization = ('Basic', ('broker', ''))

def tearDown(self):
if self.docservice:
self.setUpDS()
self.couchdb_server.delete(self.db_name)
self.couchdb_server.create(self.db_name)
db = self.couchdb_server[self.db_name]
# sync couchdb views
sync_design(db)
self.app.app.registry.db = db
self.db = self.app.app.registry.db

def check_chronograph(self):
authorization = self.app.authorization
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os

version = '1.0.2'
version = '1.0.4'

requires = [
'setuptools'
Expand Down

0 comments on commit 62495e5

Please sign in to comment.