imac late 2009 won't run hardware test
I have a late 2009 iMac that originally came with Snow Leopard but has since been updated to Yosemite.
I've been having a lot of trouble keeping my display from going to sleep when it shouldn't, and as part of my problem-solving I wanted to run the Apple Hardware Test (AHT). Following the instructions, I first tried to get it to run by restarting and pressing the D key - no luck. Then I tried running it off the original installation disc, but the computer ejects the discs every time I try to reboot. Finally I tried running it off the internet after attaching an ethernet cable to my router. Stll nothing. I am looking for any and all solutions to this problem, so I can proceed with my original problem: why my display won't stay on. I'd like to determine the cost to fix before I buy a new iMac.
VIN,iMac (21.5-inch Late 2009), OS X Yosemite (10.10.5)