'Test that missing course fields in fields json will result in the appropriate message'

@mock.patch('contentstore.management.commands.generate_courses.logger')
@ddt.data('mobile_available', 'enable_proctored_exams')
def test_missing_course_fields(self, field, mock_logger):

    settings = {'courses': [{'organization': 'test-course-generator', 'number': '1', 'run': '1', 'user': str(self.user.email), 'fields': {'display_name': 'test-course'}}]}
    arg = json.dumps(settings)
    call_command('generate_courses', arg)
    mock_logger.info.assert_any_call((field + '    has    not    been    set'))
