Just test it with a volt meter before spending the money! All you need is 1 DVOM (digital volt meter) and 2 straightened out paper clips.
Not 100% sure on wire colors, but not hard to figure out which wire is which. The TPS is a 3 wire sensor, it has a ground (probably black) a 5v reference (they're pink on autos) and then a signal return wire. The ground will be one of the end wires, the 5V ref will be the other end wire, and the signal return with be the middle.
(1)With key "ON", take the meter and paper clips and gently back probe the the ground and 5V ref (the 2 outside) wires with meter. It should read 4.5+ - OK. Next, leave the gnd probe in place and move the other lead to the middle, signal return, wire - it should read somewhere between .23-.65 volts. Next, have an assistant slowly open the throttle all the way to WOT, engine off of course. The voltage level on the signal return wire should reach 4v's or better. The closer to 5v it goes, the better, but typically over 4 indicates WOT.
In step one, if the the meter doesnt read 5V (may be a little less, that's ok as we are looking to be close to the 5V's), then you need to look at the ground and ref wire individually to see which is having an issue. Move the meter's red lead to a battery source - it should read 12+ (battery voltage) if the ground it good. Then, with the red probe back in the 5V ref, move the meter's blk lead to the battery ground and again note the voltage level on the 5V ref wire.
If the TPS's 5v ref and ground are good, but the voltage level at throttle closed is not within limits, then the TPS is faulty or needs adjusted. If the TPS is not reaching 4V+ at WOT, the TPS is faulty or the throttle is not able to open to WOT.