Hi, welcome to HCM I am Dr Das
No, bacterial infection doesn't affect hcg
As you have done the hpt test after the day of missed period , so, it is confirmed.
But, if youhave any doubts about your pregnancy
then do a hcg test in blood and followed by USG scan of whole abdomen . Thats all.