'Test that feature flag works correctly with a boolean which indicates whether a course-run already
sharing learner username/email - given the course-specific configuration record is not set previously.
This tests the backward compatibility which currently is: if an existing course run is already
sharing learner information then this feature should be enabled for that course run by default.'

@ddt.data(True, False)
def test_lti_fields_editing_is_backwards_compatible(self, is_already_sharing_learner_info):

    feature_enabled = CourseEditLTIFieldsEnabledFlag.lti_access_to_learners_editable(self.course_id, is_already_sharing_learner_info)
    feature_flag_created = CourseEditLTIFieldsEnabledFlag.objects.filter(course_id=self.course_id).exists()
    self.assertEqual(feature_flag_created, is_already_sharing_learner_info)
    self.assertEqual(feature_enabled, is_already_sharing_learner_info)
