def METHOD_NAME(self):
    notice = UserNotification.objects.add_repo_share_msg(
        self.user.username,
        repo_share_msg_to_json('bar@bar.com', self.repo.id, '/', None))
    msg = notice.format_repo_share_msg()
    assert msg is not None
    assert 'bar has shared a library named' in msg
    assert '/library/%(repo_id)s/%(repo_name)s/%(path)s' % {
            'repo_id': self.repo.id,
            'repo_name': self.repo.name,
            'path': ''} in msg