Fixed TestSetOnce tests

These tests expect exceptions to be thrown, so I added that requirement
as a test attribute.