Commit 57a1dc97abfb66b398f538c93e20f4cd972743bf

Authored by Taras Kozlovskyi
1 parent 6acea1c1

remove unused functionality

1 # -*- coding: utf-8 - 1 # -*- coding: utf-8 -
2 -import os  
3 -from munch import munchify, Munch, fromYAML 2 +from munch import munchify
4 from .initial_data import ( 3 from .initial_data import (
5 test_tender_data, test_question_data, test_question_answer_data, 4 test_tender_data, test_question_data, test_question_answer_data,
6 test_bid_data 5 test_bid_data
7 ) 6 )
8 7
9 -from dateutil.parser import parse 8 +from dateutil.parser import parse
10 from dateutil.tz import tzlocal 9 from dateutil.tz import tzlocal
11 from datetime import datetime, timedelta 10 from datetime import datetime, timedelta
12 11
13 from json import loads as convert_from_string_to_dict 12 from json import loads as convert_from_string_to_dict
14 from openprocurement_client.client import Client 13 from openprocurement_client.client import Client
15 -from datetime import datetime, timedelta  
16 from StringIO import StringIO 14 from StringIO import StringIO
17 from robot.output import LOGGER 15 from robot.output import LOGGER
18 from robot.output.loggerhelper import Message 16 from robot.output.loggerhelper import Message
19 -from robot.libraries.BuiltIn import BuiltIn  
20 17
21 18
22 def prepare_api(key=''): 19 def prepare_api(key=''):
@@ -28,22 +25,6 @@ def prepare_test_tender_data(): @@ -28,22 +25,6 @@ def prepare_test_tender_data():
28 return tender 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 def set_tender_periods(tender): 28 def set_tender_periods(tender):
48 now = datetime.now() 29 now = datetime.now()
49 tender.data.enquiryPeriod.endDate = (now + timedelta(minutes=2)).isoformat() 30 tender.data.enquiryPeriod.endDate = (now + timedelta(minutes=2)).isoformat()
Please register or login to post a comment