1 Chronicles 29:17meshar
"Since I know, O my God, that You try the heart and delight in uprightness, I, in the integrity of my heart, have willingly offered all these {things;} so now with joy I have seen Your people, who are present here, make {their} offerings willingly to You.
God tests the heart and delights in uprightness.
1 Kings 3:6yishrah
Then Solomon said, "You have shown great lovingkindness to Your servant David my father, according as he walked before You in truth and righteousness and uprightness of heart toward You; and You have reserved for him this great lovingkindness, that You have given him a son to sit on his throne, as {it is} this day.
David walked before God in uprightness of heart.
Deuteronomy 9:5yosher
"It is not for your righteousness or for the uprightness of your heart that you are going to possess their land, but {it is} because of the wickedness of these nations {that} the Lord your God is driving them out before you, in order to confirm the oath which the Lord swore to your fathers, to Abraham, Isaac and Jacob.
Israel received the land not because of its own uprightness.