fix redirect after import upload, and move/fix various tests