def setupComplexNames(): setupClass(ComplexNames) inserts(ComplexNames, [('aj', 'baker', '555-444-333', 34), ('joe', 'robbins', '444-555-333', 34), ('tim', 'jackson', '555-444-222', 32), ('joe', 'baker', '222-111-000', 24), ('zoe', 'robbins', '444-555-333', 46)], schema='firstName lastName phone age')
def setupComplexNames(): setupClass(ComplexNames) inserts(ComplexNames, [('aj', 'baker', '555-444-333', 34), ('joe', 'robbins', '444-555-333', 34), ('tim', 'jackson', '555-444-222', 32), ('joe', 'baker', '222-111-000', 24), ('zoe', 'robbins', '444-555-333', 46)], schema='firstName lastName phone age')
def setup_module(mod): global ppl setupClass([SBPerson, SBAddress]) ppl = inserts(SBPerson, [('James', ), ('Julia', )], 'name') adds = inserts(SBAddress, [('London', ppl[0].id), ('Chicago', ppl[1].id), ('Abu Dhabi', ppl[1].id)], 'city personID') ppl[0].addSharedAddress(adds[0]) ppl[0].addSharedAddress(adds[1]) ppl[1].addSharedAddress(adds[0])
def setup_module(mod): global ppl setupClass([SBPerson, SBAddress]) ppl = inserts(SBPerson, [('James',), ('Julia',)], 'name') adds = inserts(SBAddress, [('London', ppl[0].id), ('Chicago', ppl[1].id), ('Abu Dhabi', ppl[1].id)], 'city personID') ppl[0].addSharedAddress(adds[0]) ppl[0].addSharedAddress(adds[1]) ppl[1].addSharedAddress(adds[0])
def setup_module(mod): global calls, phones, sqlrepr setupClass([PhoneNumber, PhoneCall]) ViewPhoneCall._connection = PhoneNumber._connection ViewPhone._connection = PhoneNumber._connection ViewPhoneMore._connection = PhoneNumber._connection phones = inserts(PhoneNumber, [('1234567890',), ('1111111111',)], 'number') calls = inserts(PhoneCall, [(phones[0], phones[1], 5), (phones[0], phones[1], 20), (phones[1], phones[0], 10), (phones[1], phones[0], 25)], 'phoneNumber to minutes') sqlrepr = PhoneNumber._connection.sqlrepr
def setup_module(mod): global calls, phones, sqlrepr setupClass([PhoneNumber, PhoneCall]) ViewPhoneCall._connection = PhoneNumber._connection ViewPhone._connection = PhoneNumber._connection ViewPhoneMore._connection = PhoneNumber._connection phones = inserts(PhoneNumber, [('1234567890',), ('1111111111',)], 'number') calls = inserts(PhoneCall, [(phones[0], phones[1], 5), (phones[0], phones[1], 20), (phones[1], phones[0], 10), (phones[1], phones[0], 25)], 'phoneNumber to minutes') sqlrepr = PhoneNumber._connection.sqlrepr
def setup_module(mod): global ones, twos, threes setupClass([SRThrough3, SRThrough1, SRThrough2]) threes = inserts(SRThrough3, [('a',), ('b',), ('c',)], 'name') ones = inserts(SRThrough1, [(threes[0].id,), (threes[0].id,), (threes[2].id,)], 'threeID') twos = inserts(SRThrough2, [(ones[0].id,), (ones[1].id,), (ones[2].id,)], 'oneID') twos[0].addThree(threes[0]) twos[0].addThree(threes[1])
def setupNames(): setupClass(Names) inserts(Names, [('aj', 'baker'), ('joe', 'robbins'), ('tim', 'jackson'), ('joe', 'baker'), ('zoe', 'robbins')], schema='firstName lastName')
def setupGetters(cls): setupClass(cls) inserts(cls, [('bob', 'god'), ('sally', 'sordid'), ('dave', 'dremel'), ('fred', 'forgo')], 'name passwd')
def setupNames(): setupClass(Names) inserts(Names, [('aj', 'baker'), ('joe', 'robbins'), ('tim', 'jackson'), ('joe', 'baker'), ('zoe', 'robbins')], schema='firstName lastName')
def setupGetters(cls): setupClass(cls) inserts(cls, [('bob', 'god'), ('sally', 'sordid'), ('dave', 'dremel'), ('fred', 'forgo')], 'name passwd')