Added test_mode attribute