def testSelect(): setupGetters(TestSO1) for obj in TestSO1.select('all'): obj.destroySelf() assert list(TestSO1.select('all')) == []
def testDeleteBy(): setupGetters(TestSO1) TestSO1.deleteBy(name="dave") assert len(list(TestSO1.select())) == 3
def testDeleteMany(): setupGetters(TestSO1) TestSO1.deleteMany(OR(TestSO1.q.name=="bob", TestSO1.q.name=="fred")) assert len(list(TestSO1.select('all'))) == 2
def testDeleteMany(): setupGetters(TestSO1) TestSO1.deleteMany(OR(TestSO1.q.name == "bob", TestSO1.q.name == "fred")) assert len(list(TestSO1.select('all'))) == 2