Yeah, you got that completely backwards. There are a lot of different takes on the origin, but they generally all involve people on one side of something putting their toe right up to a line, so toeing the party line means to line up with the rest of the party.