예제 #1
0
def delete_location(context):
    res = locations.remove_location(context.name_active)
    assert res == "ok"
    assert locations.get_by_name(context.name_active) == 'not found'
    context.name_active = None
    ya_speech.synthesize('Удалено', context.va)
    assert ya_speech.recognize(context.va) == "удалено"
예제 #2
0
def step_impl(context):
    if context.route_from == 'current':
        context.route_from = maps_functions.get_current_geo()
    else:
        context.route_from = locations.get_by_name(context.route_from)
    context.route_to = locations.get_by_name(context.route_to)
def step_impl(context, name):
    name = name.lower()
    assert locations.get_by_name(name) != 'not found'
예제 #4
0
def delete_location_name(context, name):
    context.name_active = name.lower()
    context.name_active_loc = locations.get_by_name(context.name_active)
    pass
예제 #5
0
def step_impl(context, name):
    context.name_active = name.lower()
    context.name_active_loc = locations.get_by_name(context.name_active)