def flat_suite(suite):
    """Convert a suite object into flat testcase list."""
    tests = []

    for suite in suite.sub_suites:
        for test in suite.testcase_list:
            d = test.to_dict()
            d['suite'] = suite.name
            tests.append(d)

    return tests