If you buy direct from china, there is no quality control, or at best it's "unknown".
When buying stuff locally that is gone through "normal procedures" you can be reasonably sure that it at least confirms to some standards.
If you short both pins of the mains input plug, and then measure resistance between the primary and secondary side, you should measure Lot's of Meg Ohms, If it fails this test, then, well it failed.
If it passes this test, it does not mean much. A real test is done with a "Megger", which applies several kV between the primary and secondary side (3kV, 5kV or even 10kV, depending on standards etc.)
Small transformers often have a plastic spool with 2 chambers, and the primary and secondary windings are physically separated. Bigger transformers often have the windings over each other, with an extra layer of insulation material in between.
My advise it to open the box and look what's inside. This is an electronics forum

Note that due to physical closeness of the primary and secondary windings, there is some capacitive coupling. Transformers specified for "medical" use have:
* Extra high isolation voltage.
* Low capacitive coupling between primary and seundary.
* made in such a way that if they fail, they fail in a safe way.
Watch some youtube vid's about transformers, or take some old transformers apart if you're curious.