No, it would be regarded as an automatically unfair dismissal if the reason for the dismissal was because of your pregnancy, and it would also be against sex discrimination law.