Use attribute accessor for checking for test environment