No medical requirement exists to take the ATP knowledge ("written") exam. See 14 CFR 61.35(a).
As others have here stated, no requirement exists to hold a medical when taking the practical test for the ATP, or any other certificate or rating, in a simulator or flight training device, reference 61.23(b)(8):
§ 61.23 Medical certificates: Requirement and duration.
(b) Operations not requiring a medical certificate. A person is not required to hold a valid medical certificate--
(8) When taking a test or check for a certificate, rating, or authorization conducted in a flight simulator or flight training device.
However, if the test is taken in an aircraft other than a balloon or glider, then applicant must hold at least a third class medical certificate, as stipulated by 61.23(a)(v):
§ 61.23 Medical certificates: Requirement and duration.
(a) Operations requiring a medical certificate. Except as provided in paragraphs (b) and (c) of this section, a person--
(3) Must hold at least a third-class medical certificate -
(v) Except for a glider category rating or a balloon class rating, prior to taking a practical test that is performed in an aircraft for a certificate or rating at the recreational, private, commercial, or airline transport pilot certificate level.