After taking a look at http://www.sqlalchemy.org/trac/wiki/05Migration and the module
test/orm/deprecations.py referenced from therein, I found
test_apply_sum() to be identical (and probably suitable for the
avg case), except for the first line of the latter adapted to the function name.
So the real test case for
apply_avg() (or rather the replacement rendering it deprecated) is obviously missing and should be created.