def deltaCalc(func):
def inner(*args, **kwargs):<EOL><INDENT>count_pre = object_counter()<EOL>result = func(*args, **kwargs)<EOL>count_post = object_counter()<EOL>delta = object_count_delta(count_pre, count_post)<EOL>return (delta, result)<EOL><DEDENT>return inner<EOL>
This is a decorator that wraps functions for test purposes with
a count of objects in the database. It returns the
delta of the objects for each model class along with
the result of the tested function.