For God to be tempted would require that evil have an independent existence and be co-eternal with God, thus, dualism. And furthermore, since God and evil are apart from each other in this cosmology, you actually require an additional coeternal void to separate God from evil. And then you have to explain how that void came to be, which usually requires adding another super-deity that created God, the void, and evil, but is itself none of the above and is impassable. This proved to be the philosophical undoing of the strongly dualistic Manichean religion.
Zoroastrianism, which along with Christianity was a major influence on the syncretic Manichaean religion, in the distant past was for a time dualistoc, with the good God Ahura Mazda and the evil devil Angra Mainyu regarded as coeternal enemies. However this caused a number of problems, as it caused some Zoroastrians to doubt the prophesized victory of Good over Evil, if both were co-eternal and of equal strength. Also the question of how both came to be resulted in a major schismatic movement, Yurvanism, which was the state religion of the Sassanian Empire but is now extinct. This religion posited that Ahura Mazda and Angra Mainyu were siblings, creations of the impassable deity Yurvan, or Ormuzd, who created time, and contained both good and evil but only as potentialities, being entirely neutral itself. That sect died out when the Sassanian Empire was conquered by the Muslim Caliphate.
The surviving Zoroastrians of today now almost universally reject dualism and have adopted a more or less Christian view that Angra Mainyu is a creation of Ahura Mazda that, granted copious free will, decided to become evil. This provides theological assurance as to the ultimate triumph of Ahura Mazda. However traces of dualism remain; the Zoroastrians still believe that unpleasant creatures like serpents, insects and so forth, and also cats, which they foolishly hate, were created by Angra Mainyu in order to frustrate the good creations of Ahura Mazda like humans, gardens, trees, the haoma plant, flowers, and of course dogs; killing a sheep dog even accidentally was historically punishable by 500 lashes in their faith.
Christianity, and its predeccessors Judaism, Yahwism, and the religion of Adam, Noah, Shem and Melchizidek, being the true religion from antiquity, sidestep this obvious theological error by correctly positing that God has no equal; God is impassable and is the same yesterday, today and tomorrow. He grants His creatures free will, and one sins by consciously moving in opposition to His uncreated energies of infinite love, grace and mercy, and thus experiences these energies as scorn, chastisement and wrath; God becomes to those who hate him a consuming fire. To save humanity from our sins, the Word of God, the second person of the triune Godhead, took flesh pf the Virgin Mary by the Holy Spirit and thus became incarnate, uniting humanity with divinity in His person and tramplimg down death by death through his sacrifice on the cross; then, just as He rose after three days, we shall be raised, to face His judgement, but by grace through faith, a living faith that is made apparent through good works of charity, as opposed to the dead intellectual faith advocated by some Protestants, we ahall be saved, and become sons of God through adoption.
Thus Christ was in his humanity alone tempted, being fully human. However, at no time was the divine essence of the Holy Trinity tempted; this is impassable, and thus while the Word of God, as a man, was tempted, God was not, and is indeed incapable of beimg tempted by definition, and by definition incapable of sinning.