Can I get a dna test for myself while pregnant?

I want to find out if this man is really my father but I am also pregnant. Will that interfere with the dna sample?