Fix oauth authentication issue in test