Example #1
0
 def testDaoSaveService(self):
     data={'name':'web develop','description':'this service is to create web'}
     DAO().saveService(data)
     q = Service.query()
     services=q.fetch()
     self.assertEqual(1, len(services))
     self.assertEqual('web develop', services[0].name)
Example #2
0
 def testCreateServices(self):
     DbManager().createCompanyServices()
     services = Service.query().fetch(10)
     self.assertEqual(10, len(services))
     # test the description:
     txt1=services[0].description
     txt2='''
     this text for description for the service.
     '''
     self.assertEqual(txt1, txt2)
Example #3
0
 def getServices(self):
     q = Service.query()
     services, nextCursor, more = q.fetch_page(20)
     return services