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