If Olenna was counting on killing Joffrey with the poison in the necklace in Game of Thrones season 4, why was it given to Sansa? How could she possibly know that Sansa would wear it to the wedding?
Sir Dontos gave her a romantic and sentimental story about the necklace. It concerned how her wearing it continued his family honour etc. and basically was designed by Littlefinger to strike the right cords in Sansa.
It was the one true pure thing she had to remind her of her naïve excitement when she thought all knights were glamorous and honourable (see her reaction when she is given it). She is likely to have worn it all the time and slept with it under her pillow.
If she had turned up at the wedding without it I would guess that the Queen of Thorns would either remark on it's absence and insist she went to get it (or sent Left or Right to get it for her) with the unarguable bluster than someone of her age and position commands or executed a backup plan of some kind.
Joffrey would not be able to hurt Margery until the wedding night and there would be plenty of time to get him to drink something he didn't pour himself.
I haven't read the books, so here is my speculation just from the show: she couldn't. But, ultimately, Sansa's role was not to bring in the poison (Olenna could've done that herself), but to put the blame on Tyrion and to get her to Petyr. So, I can only assume that Olenna had a backup with her, and that she'd use it had Sansa not wore the necklace.
However, giving how well Petyr knows her, and how he is the master of intrigue and reads people well, there was a very little chance that Sansa wouldn't wear the necklace. She's surrounded by the people that she despises, and then this one man (Ser Dontos) showed her gratitude for his life. How likely is that she does not wear it, taking into the account the significance that the necklace supposedly had to this single man that made her fell good and, if only for a moment, proud? Sansa was always easy to manipulate, and this was quite an elaborate scheme.