attish/heapkeeper — comment on commit 6b548ddf5161f2302f6a947dbb614fe3496f839e
File:  line 0
By hcs42:

Nice.

My suggestion though is to make get_web_args an almost pure function:

def get_web_args(query_items=None):
if query_items is None:
inputwebpy.input().items()
for key, value in items:
...

If you follow this, you can easily write the tests for 90% of the functionality of this function, and you need the mock trickery only to the test the first two lines.