class PropertyStoreTest(base.NonePropertyStoreTest): def setUp(self): self.propertyStore = PropertyStore("user01") def test_set(self): def doSet(): self.propertyStore[propertyName("foo")] = propertyValue("bar") self.assertRaises(PropertyChangeNotAllowedError, doSet) def test_get(self): self.assertRaises(KeyError, lambda: self.propertyStore[propertyName("foo")]) def test_len(self): self.assertEquals(len(self.propertyStore), 0) def test_keys(self): self.assertEquals(self.propertyStore.keys(), ()) def test_flush(self): self.propertyStore.flush() def test_abort(self): self.propertyStore.abort()
class PropertyStoreTest(base.PropertyStoreTest): def setUp(self): self.propertyStore = self.propertyStore1 = PropertyStore("user01") self.propertyStore2 = PropertyStore("user01") self.propertyStore2._setPerUserUID("user02") def test_abort(self): super(PropertyStoreTest, self).test_abort() store = self.propertyStore self.assertEquals(store.removed, set()) self.assertEquals(store.modified, {})
def setUp(self): self.propertyStore = PropertyStore("user01")
def setUp(self): self.propertyStore = self.propertyStore1 = PropertyStore("user01") self.propertyStore2 = PropertyStore("user01") self.propertyStore2._setPerUserUID("user02")