Testing and reopening in an SEIR model