'Ensures the command is idempotent.'

def test_enroll_user_twice(self):

    command_args = ['--course', self.course_id, '--email', self.user_email]
    for _ in range(2):
        call_command('enroll_user_in_course', *command_args)
    user_enroll = get_enrollment(self.username, self.course_id)
    self.assertTrue(user_enroll['is_active'])
