im sure they could run the vin number....be it carfax or wherever. if you are that concerned about making ur shit legal, make sure u run the vin number and print it out.
and of course, obd1 and obd2 motors are a dead giveaway to any smog inspector.
and yes, once ur engine is installed you must (you dont HAVE to do anything....this is just in case you want to "legalize" your new motor in your car) take it to the smog ref (look online for the nearest ca smog ref) pay whatever fees are necessary and thats that.
i would advise you to avoid any potential complications to make sure that your cat is working, along with any smog devices and o2 sensors....put the stock air box back on and throw in a bottle of that "smog pass" shit from pep boys if you are that concerned it wont pass.
or do what im plannin on doing when i get my jdm gsr swap done. run it for two years, then a few weeks before the "test only" is due, swap back in your old motor and pass with flying colors.
the beauty of swapping your old motor in for smog is that it gives you the perfect opportunity to replace and questionable items on your jdm motor....water pump etc etc....because how often do we perform maintenance of that sort on our engines, unless it breaks....
every two years and that motor will long outlast your interest in imports....