From my experience:
I had a defensive pact with America, Egypt, India, and England. England was attacked (by the French). I was notified that I had declared war on France, and all my defensive pacts were cancelled.
Whenever you declare war on anyone (whether automatically via pact obligation...