Fix tests misusing assert and assignment vs. comparison