'Tests for anonymous_user_id method returns anonymous user id for a user.'

def test_get_anonymous_user_id_returns_id_for_existing_users(self):

    course_key = CourseKey.from_string('edX/toy/2012_Fall')
    anon_user_id = anonymous_id_for_user(user=self.user, course_id=course_key, save=True)
    django_user_service = DjangoXBlockUserService(self.user, user_is_staff=True)
    anonymous_user_id = django_user_service.get_anonymous_user_id(username=self.user.username, course_id='edX/toy/2012_Fall')
    self.assertEqual(anonymous_user_id, anon_user_id)
