Not sure who the father is

So I'm not sure who the father is.. I was sleeping with 2 guys at the same time. (I wasn't in a relationship with either one just sex) I found out I was pregnant 2 weeks ago but I'm about 2 months. they both know and they want me to take a paternity test, can you take a test before the baby is born? What is the process?