They can not use it as the reason, but California is an at will state. Meaning the can fire anyone at any time with out reason. All they have to tell you is your services are no longer needed, and they don't have to back it up with reason. But if they give reason then they have to prove that is why. Hope that makes since.
I know that in the US it is a law that they can't fire you because you are pregnant. Now I did research for your state and its the same just about everywhere that unless you request accommodations because of the pregnancy like a smaller work load or to sit they can or cannot accommodate you. If they do it automatically and try to make you working there hard you can contact the department of labor. Gl