'Test flag with various defaults provided for undefined waffle flags.'

@ddt.data({'flag_undefined_default': None, 'result': False}, {'flag_undefined_default': False, 'result': False}, {'flag_undefined_default': True, 'result': True})
def test_undefined_waffle_flag(self, data):

    RequestCache.clear_request_cache()
    test_course_flag = CourseWaffleFlag(self.TEST_NAMESPACE, self.FLAG_NAME, flag_undefined_default=data['flag_undefined_default'])
    with patch.object(WaffleFlagCourseOverrideModel, 'override_value', return_value=WaffleFlagCourseOverrideModel.ALL_CHOICES.unset):
        self.assertEqual(test_course_flag.is_enabled(self.TEST_COURSE_KEY), data['result'])
        self.assertEqual(test_course_flag.is_enabled(self.TEST_COURSE_KEY), data['result'])
        WaffleFlagCourseOverrideModel.override_value.assert_called_once_with(self.NAMESPACED_FLAG_NAME, self.TEST_COURSE_KEY)
