Fixes https://github.com/Semmle/ql/issues/1572 Adjust mock so it's more aligned with what the flask code actually does. Tests were passing before, even though we didn't handle the case in real code :\