Showing
1 changed file
with
2 additions
and
21 deletions
1 | 1 | # -*- coding: utf-8 - |
2 | -import os | |
3 | -from munch import munchify, Munch, fromYAML | |
2 | +from munch import munchify | |
4 | 3 | from .initial_data import ( |
5 | 4 | test_tender_data, test_question_data, test_question_answer_data, |
6 | 5 | test_bid_data |
7 | 6 | ) |
8 | 7 | |
9 | -from dateutil.parser import parse | |
8 | +from dateutil.parser import parse | |
10 | 9 | from dateutil.tz import tzlocal |
11 | 10 | from datetime import datetime, timedelta |
12 | 11 | |
13 | 12 | from json import loads as convert_from_string_to_dict |
14 | 13 | from openprocurement_client.client import Client |
15 | -from datetime import datetime, timedelta | |
16 | 14 | from StringIO import StringIO |
17 | 15 | from robot.output import LOGGER |
18 | 16 | from robot.output.loggerhelper import Message |
19 | -from robot.libraries.BuiltIn import BuiltIn | |
20 | 17 | |
21 | 18 | |
22 | 19 | def prepare_api(key=''): |
... | ... | @@ -28,22 +25,6 @@ def prepare_test_tender_data(): |
28 | 25 | return tender |
29 | 26 | |
30 | 27 | |
31 | -def log_object_data(data, file_name=""): | |
32 | - if not isinstance(data, Munch): | |
33 | - data = munchify(data) | |
34 | - data = data.toYAML(allow_unicode=True, default_flow_style=False) | |
35 | - LOGGER.log_message(Message(data, "INFO")) | |
36 | - if file_name: | |
37 | - output_dir = BuiltIn().get_variable_value("${OUTPUT_DIR}") | |
38 | - with open(os.path.join(output_dir, file_name + '.yaml'), "w") as file_obj: | |
39 | - file_obj.write(data) | |
40 | - | |
41 | - | |
42 | -def load_initial_data_from(file_name): | |
43 | - with open(os.path.join(os.path.dirname(__file__), 'data/{}'.format(file_name))) as yaml_file: | |
44 | - return fromYAML(yaml_file) | |
45 | - | |
46 | - | |
47 | 28 | def set_tender_periods(tender): |
48 | 29 | now = datetime.now() |
49 | 30 | tender.data.enquiryPeriod.endDate = (now + timedelta(minutes=2)).isoformat() | ... | ... |
Please
register
or
login
to post a comment