Toyota Repair: oxygen sensor circuit, o2 sensor, toyota 4x4


Question
I have a 1994 Toyota 4x4 with a 22re engine.  The check engine light was on so I did self diag. and got a code 21 (O2 sensor or sensor circuit).  I noticed two wires were ripped out of the connector between the EFI harness and the O2 sensor.  I repaired this conncection and code 21 was still coming up.  I replaced the O2 sensor and still getting a code 21.  I checked for a signal at the diag. box with a voltmeter and got nothing.  So theres gotta be a problem in the circuit somewhere.  Or is the ECU bad?  I am just wondering what is the best way to find the problem.  And isn't it odd that I passed an emissions test even though my O2 sensor is disconnected and my truck is running in an "open loop"?  If anyone can tell me where is the best places to test the circuit and how to test it, I would really appreciate it.  Thanks.  

Answer
I know this may sound a little bit too simple but did you clear the dtc21 after replacing the sensor?
What terminal did you check at the DLC for O2 sensor voltage?
I have no idea how you could pass the emission test because if the engine does not go to closed loop the check engine light will come on and in that case can't even be tested in the first place.