The Iran war is posing a test for the Canadian prime minister's "pragmatic but principled" approach to world affairs.