The California State ASM (accelerated simulation mode) smog check requires your Nissan Altima be tested while only in DRIVE. Overdrive should not be engaged. The troubling indication you've made is the disconnection of the TPS.
Disconnecting the TPS is not a condition required (or allowed) during the administration of the smog inspection. If you are certain this occurred, we recommend contacting the BAR regarding this matter. (800) 952-5210.