use null instead of undefined variable
fold patch tests into one
new ``assertCorsHeaders`` method for some reuse
refactor test for failing put