Fix unit-tests
Looks like something changed in the flask framework and the way it
sets the Location header upon redirect.
Adjusts these tests to account for this change but keeping them backward
compatible.
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>