Issue #3402007 by marvil07, mstrelan, quietone, smustgrave, larowlan: Fix strict type errors in test modules (cherry picked from commit d43e2ba8)