Fixing test failures caused by Request.type==json requirement.