flatter oneself
Be gratified vainly by one's own achievement; exaggerate one's good points. For example, He flattered himself that his presentation at the sales conference was a success, or She flattered herself that she was by far the best skater at the rink. This usage is often put negatively, as in Don't flatter yourself
we haven't won the contract yet. [Late 1500s]