Fix API tests

POST requests require a referrer now.

http://hydra.nixos.org/build/42775011

Created by  Eelco Dolstra  on October 27, 2016
QHOKZZUCFAI6ETEHCM2TO4P5ZMBSRR25MT55JVIGX3G5SHTXC3UQC
In channels
main
upstream
Change contents