Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@when(r'I restore the backup named "{backup_name}" for "{fqtn}" table')
def _i_restore_the_backup_named_for_table(context, backup_name, fqtn):
medusa.restore_node.restore_node(
context.medusa_config,
Path("/tmp"),
backup_name,
in_place=True,
keep_auth=False,
seeds=None,
verify=None,
keyspaces={},
tables={fqtn},
use_sstableloader=False,
)
@when("I get the suggested params")
def suggested_params(context):
context.params = context.acl.suggested_params_as_object()
@when('I invoke send_diagnostics message')
def step_impl(context):
context.langServer.send_diagnostics('/sample', [])
context._diagCount = 0
@when("we make any LookupAccountByID call")
def lookup_account_any(context):
context.response = context.icl.account_info("PNWOET7LLOWMBMLE4KOCELCX6X3D3Q4H2Q4QJASYIEOF7YIPPQBG3YQ5YI", 12)
@when('we wait for the chronos job stored as "{job_name}" to appear in the job list')
def chronos_job_is_ready(context, job_name):
"""Wait for a job with a matching job id to be ready."""
chronos_tools.wait_for_job(context.chronos_client, context.jobs[job_name]["name"])
@when('I attempt to commit')
def commit(context):
context.last_command = bash('git commit -q -m "commit"')
@when(u'we create an instance of that class')
def step_impl(context):
klass = context.klass
context.value = klass(1,2,3)
@when("I click on the applicant's row")
def click_row(context):
selector = application_row_selector.format(SEARCHABLE_APPLICANT_ID)
selector += ' > td:first-child > a'
element = context.browser.find_element_by_css_selector(selector)
element.click()
@when("I assign paragraph.alignment = PP_ALIGN.CENTER")
def when_I_assign_paragraph_alignment_eq_center(context):
context.paragraph.alignment = PP_ALIGN.CENTER
@when('I assign {value} to paragraph_format.line_spacing')
def when_I_assign_value_to_paragraph_format_line_spacing(context, value):
new_value = {
'Pt(14)': Pt(14),
'2': 2,
}.get(value)
new_value = float(value) if new_value is None else new_value
context.paragraph_format.line_spacing = new_value