If I find it in a store, I just check it all in regards to normal playing. Tune it up, play a while, see if it holds tuning well. Play it all over the board and make sure there aren't any major issues. Sight down the neck to make sure it's not twisted. Mess with all the controls and ensure they work well and do as they should. Basically, if anything seems wrong, I either don't get it or I make sure it's something I can live with (cosmetic) or can be repaired easily. Most of all, I make sure the price is inline with fair value so I can turn around and sell it quickly if necessary. Also, if it's a major problem (such as broken truss rod), I don't care if it's a no-return policy, a case like that means it will returned or amends will be made.
If buying online, I just make sure to ask all the right questions such as what I mentioned above, and try to view as many pictures as possible. Definitely a higher risk, but if it's a reputable seller or store, I don't feel so bad. Generally speaking, though, I won't buy online from a store unless there's a return policy (at the very least to return in the event the instrument isn't as described), but mostly I just buy here on Talkbass where I can ask a lot of questions and know the fellow members are more likely to make things right. Thankfully though, with all my transactions, I've never received anything in a condition other than described with the exception of some small cosmetic issues, which I don't really care because I expect a used instrument to be used. I'm more surprised when they arrive in near-mint condition (and it's almost always the sellers who DON'T use the term "like new" or "near mint" or anything like that who have the better conditioned instruments. Nearly everyone who's said the bass is "mint" has always had a noticeable issue, but again, that's what pictures and realistic expectations are for).