The short answer is no, not if the emission monitors are not ready for the smog check.
Having been successful in turning off the check engine light by disconnecting the battery means your vehicle had not stored emissions data in the ROM section of the engine control unit (ECU) and you've not deleted important emission monitor (readiness flag) data. You must perform a drive cycle and get the monitors Complete or Ready in order to pass the smog inspection.
2000 and newer model year vehicles will need all emission monitors in READY or COMPLETE status, with the exception of the EVAP monitor. An incomplete evaporative monitor will not cause a smog check failure. It will be the only monitor allowed to be incomplete on a 2000 & newer vehicle (as of the time of this post).
Related Material:
How To Turn Off The Check Engine Light?
How Many Incomplete Monitors Are Allowed?