Martin Luther said, "You cannot keep birds from flying over your head but you can keep them from building a nest in your hair."
You can't keep the Devil from suggesting thoughts, but you can choose not to dwell or act on them.
Thus sinning is based on our own will. Whether we choose to sin when we are tempted to depends on us. God said Himself that He would not tempt us beyond what we are capable of. So? If that is the case, He knows we can handle it... It is only whether we want to do what is truly right, or what we feel like doing at the moment..