I sold salvage auto parts for 8 years. You must know that you re buying used parts that 99% of the time came from a car that was totaled by the insurer after an accident/flood/ theft, etc. Even if the part is listed online as "tested", chances are it was not. If a car hits a tree, how can a salvage yard test it? Very few engines are ever started before dismantling let alone "yard driven". If a car was running when it rolled over and killed the occupants, it's still considered A1 condition. The risk is all on you, especially at the smaller yards.
Bigger outfits, such as LKQ, will be more lenient with their return policies.
Check car-part.com. It's the most comprehensive website for used parts.