Fix test that failed on 2.6

test_compile_factory_pattern_without_app_context