It sounds like you are in a difficult place and its is understandable with finding the pregnancy test that you are concerned. Being a parent to a 15 year old young woman is definitely a challenge,.
I can understand your apprehension about telling her that you went into her backpack. On one hand, teenagers need a privacy, but they also need to have a parent to guide them in choices they make.
It sound like you know that she is going to perceive you going into her backpack as an intrusion. Getting her upset this point, is not going to help in the big picture.
This is a suggestion.....Why don't you sit down with her and do a bot of a role reversal? Tell her what happened, but use the third person...."An old friend of mine from high school called and asked my advice about a situation. She found a pregnancy in her daughters backpack" This is commonly called a back door approach.
By indirectly approaching the question, you can reduce some of the emotionality of the topic. You can address the pregnancy test and the backpack intrusion in more neutral terms.
I hope this helps to open a dialogue between you and your daughter. Perhaps she picked up the pregnancy test for a friend.
Please let me know if I can provide any additional information. If not, please remember to accept the answer and rate my service.