def testCreate(self): # Tell Humble about our table without having to define it humble = Humble( self.db ) # Create a new row object to manipulate employee = humble.create( 'employee' ) # Normal Assignment employee.first = "Derrick" employee.last = "Wippler" employee.save() # Get the employee record employee = humble.get( 'employee', 1 ) self.assertEquals( employee.first, 'Derrick' ) self.assertEquals( employee.last, 'Wippler' ) # Since we didn't define these values, they are empty self.assertEquals( employee.age, None ) self.assertEquals( employee.address, None ) return humble
def createDataSet(self): humble = Humble( self.db ) humble.insert( "employee", { 'first':'Joe', 'last':'McBride', 'age':21, 'address':"Castle Drive" } ) humble.insert( "employee", { 'first':'Nathan', 'last':'Cassano', 'age':29, 'address':"Washington Drive" } ) humble.insert( "employee", { 'first':'Ryan', 'last':'Springer', 'age':28, 'address':"France Drive" } ) return humble