You shouldn't lie about who farted.
"James accidentally farted loudly while sitting in math class, and the teacher asked, ""Who did that?""."
James wants to avoid being embarassed.
James remains silent and lets the teacher keep asking the class.
James blames his friend, who's sitting next to him.
The teacher eventually gives up and returns to teaching the lesson without singling anyone out.
The teacher sends James' friend to the hallway, and at lunch the friend calls James terrible.