fix tests for cached weights loading