No. Each game has unique cheat codes. While both use testingcheatsenabled true to activate cheat mode, the specific commands and effects differ.
testingcheatsenabled true
Find a dedicated Sims 3 cheat list online or in the game manual.