Fix import loop by moving testing bootstrap context