That issweet.
Just noticed your bolded question. SMOG certificate is good for 90 days for title transfer purposes as far as DMV Is concerned
As a theoretical buyer, I want it done concurrent with sale, as a LOT can go wrong in 90 days, 30 days even, (IMO) that I would then be on the hook for the next time the test is due, with no recourse. Test On Sale is a sign of good faith to me.