def METHOD_NAME(self, notify_on_new_thread_reply_mock):
    """edit post endpoint updates mentions"""
    user = create_test_user("User", "user@example.com")
    other_user = create_test_user("Other_User", "otheruser@example.com")
    response = self.client.post(
        self.post_link, data={"post": "This is test response, @%s!" % user}
    )
    self.assertEqual(response.status_code, 200)
    post = self.user.post_set.order_by("id").last()
    self.assertEqual(post.mentions.count(), 1)
    self.assertEqual(post.mentions.order_by("id")[0], user)
    # add mention to post
    edit_link = reverse(
        "misago:api:thread-post-detail",
        kwargs={"thread_pk": self.thread.pk, "pk": post.pk},
    )
    response = self.put(
        edit_link,
        data={"post": "This is test response, @%s and @%s!" % (user, other_user)},
    )
    self.assertEqual(response.status_code, 200)
    self.assertEqual(post.mentions.count(), 2)
    self.assertEqual(list(post.mentions.order_by("id")), [user, other_user])
    # remove first mention from post - should preserve mentions
    response = self.put(
        edit_link, data={"post": "This is test response, @%s!" % other_user}
    )
    self.assertEqual(response.status_code, 200)
    self.assertEqual(post.mentions.count(), 2)
    self.assertEqual(list(post.mentions.order_by("id")), [user, other_user])
    # remove mentions from post - should preserve mentions
    response = self.put(edit_link, data={"post": "This is test response!"})
    self.assertEqual(response.status_code, 200)
    self.assertEqual(post.mentions.count(), 2)
    self.assertEqual(list(post.mentions.order_by("id")), [user, other_user])