Now, that's a very interesting question.. I've had some friends throw a few surprises, like one very good friend expressed, quite out of the blue, homophobic sentiments. I was so surprised and horrified. I erm made a comment, and it was to do with going and doing something to himself in order to calm down.. He wasn't terribly impressed with that comment, understandably. We are still friends...
Another friend, who I have known for at least 20 years made a comment about transgender people, it wasn't really outrageous but I felt it was a bit shocking... I chose to ignore it and we are still friends..
One other friend, turned out to be a Trump supporter, needless to say she is American - but now *that* is inexcusable :P No seriously, I wasn't entirely shocked as I had suspected over the years that she was that way inclined :P In the end I didn't end the friendship - she did and honestly, she turned so nasty; the usual insults and unpleasantness... that I felt there was nothing to lose anyway - I retain some fondness for her and the memories but she wasn't ever a friend really..
SO a complex answer, sorry - perhaps there is no yes or no to this one? Sometimes a friendship won't survive such a difference, sometimes the difference is just too shocking or too fundamental.. Mostly though I wouldn't end a friendship because of political views.
One of my brothers is a conservative, my sister can be quite shockingly racist at times. I vehemently disagree with both of them and love them to bits.
It seems that if they were your friend, they might have already known your political beliefs, or at least had the opinion that differences in political beliefs are not worth severing a friendship over.