def test_bad_set(self): with self.assertRaises(ValueError): _boolean_property.__set__(self.p, self.o, 'bad')
def test_set(self): _boolean_property.__set__(self.p, self.o, True) self.o.set_property.assert_called_once_with('name', True)