Test wires using magnets?

nothing to do with magnetism

he either was using a self powered test light (continutity tester) or a device that can power a light your working on