Unprotected sex

How long until I can take a pregnancy test? I had unprocted sex with my boyfriend about a week ago and freaking out about pre cum. He pulled out way before so that's not a problem I'm just worried about pre. I'm due for my period in 7 days. Please help