convert fixture into *behave* examples
    :param fixture: a dictionary in the following form::

        {
            "test1name":
            {
                "test1property1": ...,
                "test1property2": ...,
                ...
            },
            "test2name":
            {
                "test2property1": ...,
                "test2property2": ...,
                ...
            }
        }

    :return: a list, with each item represent a table: `(caption, rows)`,
    each item in `rows` is `(col1, col2,...)`

def fixture_to_tables(fixture):
    """ convert fixture into *behave* examples
    :param fixture: a dictionary in the following form::

        {
            "test1name":
            {
                "test1property1": ...,
                "test1property2": ...,
                ...
            },
            "test2name":
            {
                "test2property1": ...,
                "test2property2": ...,
                ...
            }
        }

    :return: a list, with each item represent a table: `(caption, rows)`,
    each item in `rows` is `(col1, col2,...)`
    """

    tables = []
    for (title, content) in fixture.iteritems():
        rows = []

        # header(keyword) row
        keys = sorted(content.keys())
        rows.append(tuple(keys))

        # item(value) row
        row1 = []
        for col in rows[0]:
            row1.append(content[col])
        rows.append(tuple(row1))

        tables.append((title, tuple(rows)))
    return tables