fix test failures: clear loc_mapper cache
can't reference Django in xmodule