So, the way you get HIV was explained to you. What you write about in your post is not a risk. Even with the fistula. A wound has to be wide open, gaping, emergency type of wound to ever be something to even worry about. You did not have a risk and should move on.
Sorry for another question. Is the perianal abscess or the opening of an anal fistula considered as an open sore/wound? Many thanks in advance.
As an adult, the only risks for HIV are:
1) having unprotected, penetrative vaginal or anal sex, or
2) sharing IV drug needles with other IV drug users.
NOTHING else you can think of is a risk for HIV, including the event you described. You do not need to test at all for HIV, since you were not at risk of contracting HIV.