Showing
1 changed file
with
8 additions
and
18 deletions
@@ -16,7 +16,7 @@ import time | @@ -16,7 +16,7 @@ import time | ||
16 | from .initial_data import ( | 16 | from .initial_data import ( |
17 | test_tender_data, test_question_data, test_question_answer_data, | 17 | test_tender_data, test_question_data, test_question_answer_data, |
18 | test_bid_data, test_award_data, test_complaint_data, test_complaint_reply_data, test_tender_data_multiple_lots, | 18 | test_bid_data, test_award_data, test_complaint_data, test_complaint_reply_data, test_tender_data_multiple_lots, |
19 | - auction_bid, prom_tender_data | 19 | + auction_bid, prom_test_tender_data |
20 | ) | 20 | ) |
21 | 21 | ||
22 | def change_state(arguments): | 22 | def change_state(arguments): |
@@ -27,23 +27,9 @@ def change_state(arguments): | @@ -27,23 +27,9 @@ def change_state(arguments): | ||
27 | except IndexError: | 27 | except IndexError: |
28 | return "pass" | 28 | return "pass" |
29 | 29 | ||
30 | -def prepare_prom_tender_data(): | ||
31 | - return munchify({'data': prom_tender_data()}) | ||
32 | - | ||
33 | -def get_dates(): | ||
34 | - start_date = date.today() | ||
35 | - end_date = start_date + timedelta(days=1) | ||
36 | - start_request_date = start_date + timedelta(days=2) | ||
37 | - end_request_date = start_date + timedelta(days=3) | ||
38 | - date_delivery_start = start_date + timedelta(days=4) | ||
39 | - date_delivery_end = start_date + timedelta(days=5) | ||
40 | - return { | ||
41 | - 'end_date': end_date.strftime("%d.%m.%Y %H:%M"), | ||
42 | - 'start_request_date': start_request_date.strftime("%d.%m.%Y %H:%M"), | ||
43 | - 'end_request_date': end_request_date.strftime("%d.%m.%Y %H:%M"), | ||
44 | - 'date_delivery_start': date_delivery_start.strftime("%d.%m.%Y %H:%M"), | ||
45 | - 'date_delivery_end': date_delivery_end.strftime("%d.%m.%Y %H:%M"), | ||
46 | - } | 30 | +def prepare_prom_test_tender_data(): |
31 | + return munchify({'data': prom_test_tender_data()}) | ||
32 | + | ||
47 | def compare_date (isodate, broker_date): | 33 | def compare_date (isodate, broker_date): |
48 | iso_dt=parse_date(isodate) | 34 | iso_dt=parse_date(isodate) |
49 | br_dt=datetime.strptime(broker_date, "%d-%m-%Y, %H:%M") | 35 | br_dt=datetime.strptime(broker_date, "%d-%m-%Y, %H:%M") |
@@ -67,6 +53,10 @@ def log_object_data(data, file_name="", format="yaml"): | @@ -67,6 +53,10 @@ def log_object_data(data, file_name="", format="yaml"): | ||
67 | with open(os.path.join(output_dir, file_name + '.' + format), "w") as file_obj: | 53 | with open(os.path.join(output_dir, file_name + '.' + format), "w") as file_obj: |
68 | file_obj.write(data) | 54 | file_obj.write(data) |
69 | 55 | ||
56 | +def convert_date_to_prom_format(isodate): | ||
57 | + iso_dt=parse_date(isodate) | ||
58 | + day_string = iso_dt.strftime("%d.%m.%Y %H:%M") | ||
59 | + return day_string | ||
70 | 60 | ||
71 | def load_initial_data_from(file_name): | 61 | def load_initial_data_from(file_name): |
72 | if not os.path.exists(file_name): | 62 | if not os.path.exists(file_name): |
Please
register
or
login
to post a comment