Commit a4a329f109d68bb6dfa8bca86c6d765e0e860d9a

Authored by Roman Zaporozhets
1 parent 5568bd1c

change data/brokers.yaml data/users.yaml service_keywords.py

@@ -47,13 +47,13 @@ Newtend: @@ -47,13 +47,13 @@ Newtend:
47 provider: Newtend_Provider1 47 provider: Newtend_Provider1
48 viewer: Newtend_Viewer 48 viewer: Newtend_Viewer
49 Prom: 49 Prom:
50 -# intervals:  
51 -# enquiry:  
52 -# - 0  
53 -# - 5  
54 -# tender:  
55 -# - 0  
56 -# - 31 50 + intervals:
  51 + enquiry:
  52 + - 8
  53 + - 8
  54 + tender:
  55 + - 0
  56 + - 31
57 keywords_file: prom 57 keywords_file: prom
58 roles: 58 roles:
59 tender_owner: Prom_Owner 59 tender_owner: Prom_Owner
@@ -98,17 +98,21 @@ users: @@ -98,17 +98,21 @@ users:
98 Prom_Owner: 98 Prom_Owner:
99 broker: Prom 99 broker: Prom
100 username: Promtest 100 username: Promtest
101 - homepage: "http://zakupki.dz-test.net" 101 + homepage: "http://my.dz-test.net/cabinet/purchases/state_purchase/list"
  102 + login: test@test12.com
  103 + password: 1234
102 browser: chrome 104 browser: chrome
103 - position: [0, 0]  
104 - size: [640, 450] 105 + position: [0, 0]
  106 + size: [1280, 1024]
105 Prom_Viewer: 107 Prom_Viewer:
106 broker: Prom 108 broker: Prom
107 username: Promtest 109 username: Promtest
108 - homepage: "http://zakupki.dz-test.net" 110 + homepage: "http://my.dz-test.net/cabinet/purchases/state_purchase/list"
  111 + login: r.zaporozhets@smartweb.com.ua
  112 + password: 1234
109 browser: chrome 113 browser: chrome
110 - position: [640, 0]  
111 - size: [640, 450] 114 + position: [640, 0]
  115 + size: [1280, 1024]
112 Publicbid_Owner: 116 Publicbid_Owner:
113 broker: Publicbid 117 broker: Publicbid
114 username: Publicbid 118 username: Publicbid
@@ -203,3 +203,41 @@ def convert_datetime_to_dot_format(isodate): @@ -203,3 +203,41 @@ def convert_datetime_to_dot_format(isodate):
203 203
204 def local_path_to_file(file_name): 204 def local_path_to_file(file_name):
205 return os.path.join(os.path.dirname(__file__), 'documents', file_name) 205 return os.path.join(os.path.dirname(__file__), 'documents', file_name)
  206 +
  207 +
  208 +## Prom.ua
  209 +def get_all_prom_dates(period_interval=31):
  210 + now = datetime.now()
  211 + return {
  212 + 'EndPeriod': (now + timedelta(minutes=8)).strftime("%d.%m.%Y %H:%M"),
  213 + 'StartDate': (now + timedelta(minutes=8)).strftime("%d.%m.%Y %H:%M"),
  214 + 'EndDate': (now + timedelta(minutes=(8 + period_interval))).strftime("%d.%m.%Y %H:%M"),
  215 + }
  216 +
  217 +def convert_date_to_prom_tender(isodate):
  218 + first_iso = datetime.strptime(isodate, "%d.%m.%y").isoformat()
  219 + return first_iso
  220 +
  221 +
  222 +def convert_date_to_prom_tender_startdate(isodate):
  223 + first_date = isodate.split(' - ')[0]
  224 + first_iso = datetime.strptime(first_date, "%d.%m.%y %H:%M").isoformat()
  225 + return first_iso
  226 +
  227 +def convert_date_to_prom_tender_enddate(isodate):
  228 + second_date = isodate.split(' - ')[1]
  229 + second_iso = datetime.strptime(second_date, "%d.%m.%y %H:%M").isoformat()
  230 + return second_iso
  231 +
  232 +
  233 +def procuringEntity_name_prom(INITIAL_TENDER_DATA):
  234 + INITIAL_TENDER_DATA.data.procuringEntity['name'] = u"Test_company_from_Prozorro"
  235 + return INITIAL_TENDER_DATA
  236 +
  237 +
  238 +def convert_prom_string_to_common_string(string):
  239 + return {
  240 + u"Украина": u"Україна",
  241 + u"Киевская область": u"м. Київ",
  242 + u"килограммы": u"кілограм",
  243 + }.get(string, string)
Please register or login to post a comment