In most educational systems, people write tests. These tests are generally meant to find out how best those who have been taught can apply the things learnt. In the stories in the bible, a key feature is people faced with the dilemma of following their own desires or trusting God and doing things differently.
Two stories that easily come to mind are that of Joseph the dreamer and King David. Joseph, a young man in the house of Potiphar, was Potiphar's most trusted servant, so trusted that Potiphar made him chief over his other slaves. It is important to remember Joseph was a young man with most likely no sexual experience at the time. As the story reaches a plot twist, Potiphar’s wife falls in love with Joseph and desires to have him in a carnal way. Scripture tells us that she beckoned on him several times but Joseph refused citing his master's goodwill to him and his unwillingness to sin against God as the reasons why. On a particular day when no other man was around, she grabbed Joseph's garment demanding for sex, Joseph left the garment with her and ran. There are different reasons as to why he ran, one could be that running was Joseph saving 'himself from himself'. Anyways, she gets mad and Joseph is thrown into prison, the rest of the story is not hidden.
Next case scenario is King David. On a certain day, we find King David, not at war, which is quite unusual because even as king he also fought in battles. David from his balcony spies on a woman bathing stark naked. What initiated all this as to why the women's bathroom was so visible or if David was one given to 'peeping' is not clearly stated in scripture but here we find a moment of drama. David finds this woman attractive, he has the choice to refrain from adultery or indulge his carnal desires. He does the latter. The woman gets pregnant, he gets her husband killed and the story does not end too well in the end.
These two stories show us two things. Firstly, God is not responsible for anyone's mistakes, neither is the devil. At the end of the day, the choice to do righteous or evil lies with the individual man/woman. Secondly, in this world we face tests; situations that present themselves a lot of times without warning and demand an immediate response with effects so far-reaching.
It is in topics like this, the words of Paul the apostle echo so loudly. He advised his young protege, that before his work as a minster, he should "take heed to thyself" (1 Timothy 4:16). Personal growth and discipline that comes from the word of God is something that all Christians should earnestly covet and make real in their lives because as Paul again once said "the days are evil" (Ephesians 5:16). A lot of times, temptation comes unannounced. Jesus told us to pray that we do not fall into temptation, that is, fail a test of life (Mathew 26:41). Wisdom in Proverbs said that "If thou fall in the day of adversity, your strength is small" (Proverbs 24:10). A simple interpretation in the light of this discussion will mean; you're a man/woman of indiscipline lacking character.
Mind you that scripture is full of men who lacked discipline but still performed great feats for God. This discipline is not about doing something to get something, it is about living a life worthy of your knowledge of God.
Take special interest in training your body to respond to righteousness. This happens by the conscious meditation on scripture and allowing the words you see have an influence on your character.