コード例 #1
0
def stub_lazy_loaded_grouped_loans(array_of_query_and_body, group_level_names):
    stubs = []
    for item in array_of_query_and_body:
        path = "/chunkedGroups"
        query = item['query']
        for group_level_name in group_level_names:
            path += '/' + group_level_name + 's'
            if group_level_name in query:
                path += '/' + str(query[group_level_name])
                del query[group_level_name]
            else:
                break
        stubs.append(StubFactory.make_group_stub(item["body"], path))
    return stubs
コード例 #2
0
def stub_grand_total_row():
    rows = [{"id": "1"}]
    stub = StubFactory.make_group_stub(rows)
    return [stub]