Change test to be compatible with newer Flask version