test_record deprecation fix