def step_impl(context, file_name): old_new_parts = { '{path}': context.custom_config['server_dir'] + file_name + "_template.xlsx", '{path2}': context.custom_config['server_dir'] + file_name + ".xlsx", } file_dir = './base/files_for_ssh' assert correct_py_file(file_name, old_new_parts) change_db_through_django(context, file_name, file_dir)
def step_impl(context, value): old_new_parts={ '{ACC_ID}': str(context.account_type_id), '{VALUE}': value, } file_name = 'update_or_create_bonus' file_dir = './base/files_for_ssh' correct_py_file(file_name, old_new_parts) change_db_through_django(context, file_name, file_dir)
def step_impl(context, field, hr_id, value): old_new_parts={ '{USER_ID}': hr_id, '{FIELD}': field, '{VALUE}': value, } file_name = 'update_userdata' file_dir = './base/files_for_ssh' correct_py_file(file_name, old_new_parts) change_db_through_django(context, file_name, file_dir)
def step_impl(context, file_name, phrase, modificator_types): old_new_parts = { '{PATH}': context.custom_config['server_dir'] + 'month_propreports_template.xlsx', '{PATH2}': context.custom_config['server_dir'] + 'month_propreports.xlsx', '{PHRASE}': phrase, '{MODIFICATOR_TYPES}': modificator_types, } file_dir = './base/files_for_ssh' assert correct_py_file(file_name, old_new_parts) change_db_through_django(context, 'AS_cleaner', file_dir) change_db_through_django(context, file_name, file_dir)
def step_impl(context, hr_id, serv_type, serv_name, value): month = datetime.now().month - 1 serv_date = datetime.now().replace(month=month).timestamp() old_new_parts={ '{USER_ID}': hr_id, '{SERV_TYPE}': serv_type, '{SERV_NAME}': serv_name, '{VALUE}': str(value), '{DATE}': str(serv_date) } file_name = 'update_or_create_service' file_dir = './base/files_for_ssh' correct_py_file(file_name, old_new_parts) change_db_through_django(context, file_name, file_dir)
def step_impl(context, clearing, company, broker, side, value): old_new_parts = { '{CLEARING}': clearing, '{COMPANY}': company, '{BROKER}': broker, '{USER_BILL}': context.user_bill_id, '{CompanyBill}': context.company_bill_id, '{SIDE}': side, '{VALUE}': value, '{ACCOUNT_NAME}': clearing + company + broker, } file_name = 'create_propreports_transaction' file_dir = './base/files_for_ssh' correct_py_file(file_name, old_new_parts) change_db_through_django(context, file_name, file_dir)