[bug 1032571] Fix tests to catch csrf issues in the api