Unprotected Sex & Pregnancy?

I know the obvious you should expect to be pregnant if you had unprotected sex thing and x,y,z lol question is how long should a person wait after unprotected sex to test for pregnancy?