Exemple #1
0
def step_impl(context):
    expected_locations = [row['name'] for row in context.table]

    feed = get_locations_by_type(*EXPORTABLE)
    actual_locations = [location.name for location in feed.entries]
    
    assert_that(actual_locations, contains_inanyorder(*expected_locations))
Exemple #2
0
def step_impl(context, type, name):
    lds = get_locations_by_type(getattr(Location.Type, type))
    by_name = {ld.name: ld for ld in lds.entries}
    assert_that(name, 
          is_in(by_name.keys()))
    context.that_location = by_name[name]