I don't know the answer. But my first guess is that (to a first approximation) a magnet inside a metal box does not create a magnetic field outside of that box [1]. Of course this depends on the material of the tube.
A magnet inside a ferromagnetic box. The box material has to have a high permeability to shield an enclosed magnet from external detection.
You can think of permeability in this instance as the ability to contain a magnetic field. As long as the shielding material doesn't saturate (too much magnetic flux), the field from an enclosed magnet can be confined within the enclosing material. No external detectable field.
[1] http://physics.stackexchange.com/questions/38759/does-farada...