def encode_table(pieces, table):
    table = table or {}
    length_index = len(pieces)
    pieces.append(None)  # placeholder
    tablesize = 0
    for (key, value) in table.items():
        tablesize += encode_short_string(pieces, key)
        tablesize += encode_value(pieces, value)

    pieces[length_index] = struct.pack('>I', tablesize)
    return tablesize + 4
Verify that add_url_rule is called with the right arguments when a route is
dataset/ETHPy150Open pika/pika/pika/data.py/encode_table--crossover with--dataset/ETHPy150Open gwongz/flask-apiblueprint/test_apiblueprint.py/TestAPIBlueprint.test_add_url_rule