I would watch the owner/trainer/student/leasee of the horse you are buying ride first. That way, you can see how they ride and how the horse has been ridden for the past however long. IF they misbehave (beyond the usual testiness towards a new rider), you will see it on someone who rides the horse semi-regularly. You can really gauge how you may want to handle a horse by watching someone who rides them regularly handle them, especially if they are a really soft or really rough rider. Because I usually ride my instructors sale horses, often, I rode the horses for buyers to see how the horse acts with a rider that is not an instructor/trainer.
If you have a trainer, bring your trainer. When I ride by myself, I piddle paddle all over the place and don't really have GO to make myself work. Especially when it comes to cantering and jumping on a new horse, which I have had a lot of experience with lately (having ridden 8 or 9 new, unfamiliar horses in an arena in the last 2 months, 7 of them outside of lessons, only 3 or 4 of them not considerably green). If I have a trainer or instructor putting me through my paces, I ain't piddling; I'm working, and I'm making that horse work with me.
When my instructor sells a horse, and the possible buyer wants to bring a trainer, she'll let them take a short lesson on the horse. A good lesson experience on a new horse gives both the buyer and the trainer (who will probably be working with the horse) a good feel for the horse and better helps to decide whether the horse is a good match for the buyer.