The US president was tested a week after meeting Brazilian officials later found to be infected.