Esempio n. 1
0
class ColoniaDAO_Test(unittest.TestCase):
    serviceFactory = None
    coloniaDAO = None

    def setUp(self):
        '''
        '''
        config = Config()
        self.serviceFactory = ServiceFactory(config)
        self.coloniaDAO = self.serviceFactory.daos["coloniaDAO"]
        pass


    def tearDown(self):
        self.serviceFactory.closeConnection()
        pass


    def test_obtenerColoniaId(self):
        colonia_id = self.coloniaDAO.obtenerColoniaId(u"San cuanácaro")
        print colonia_id
        
        colonia_id = self.coloniaDAO.obtenerColoniaId(u"San cuanácaro")
        print colonia_id
        
        colonia_id = self.coloniaDAO.obtenerColoniaId(u"Terepitengo")
        print colonia_id
        pass
    
        colonia_id = self.coloniaDAO.obtenerColoniaId(u"Terepitengo")
        print colonia_id
        pass
Esempio n. 2
0
 def setUp(self):
     '''
     '''
     config = Config()
     self.serviceFactory = ServiceFactory(config)
     self.coloniaDAO = self.serviceFactory.daos["coloniaDAO"]
     pass
Esempio n. 3
0
class ColoniaDAO_Test(unittest.TestCase):
    serviceFactory = None
    coloniaDAO = None

    def setUp(self):
        '''
        '''
        config = Config()
        self.serviceFactory = ServiceFactory(config)
        self.coloniaDAO = self.serviceFactory.daos["coloniaDAO"]
        pass

    def tearDown(self):
        self.serviceFactory.closeConnection()
        pass

    def test_obtenerColoniaId(self):
        colonia_id = self.coloniaDAO.obtenerColoniaId(u"San cuanácaro")
        print colonia_id

        colonia_id = self.coloniaDAO.obtenerColoniaId(u"San cuanácaro")
        print colonia_id

        colonia_id = self.coloniaDAO.obtenerColoniaId(u"Terepitengo")
        print colonia_id
        pass

        colonia_id = self.coloniaDAO.obtenerColoniaId(u"Terepitengo")
        print colonia_id
        pass
Esempio n. 4
0
class CalleDAO_Test(unittest.TestCase):
    serviceFactory = None
    calleDAO = None

    def setUp(self):
        """
        """
        config = Config()
        self.serviceFactory = ServiceFactory(config)
        self.calleDAO = self.serviceFactory.daos["calleDAO"]
        pass

    def tearDown(self):
        self.serviceFactory.closeConnection()
        pass

    def test_obtenerCalleId(self):
        calle_id = self.calleDAO.obtenerCalleId(u"Perepepengue", 10, 11)
        print calle_id

        calle_id = self.calleDAO.obtenerCalleId(u"Sulum", 10, 11)
        print calle_id

        calle_id = self.calleDAO.obtenerCalleId(u"Terettt", 10, 11)
        print calle_id

        calle_id = self.calleDAO.obtenerCalleId(u"Perepepengue", 10, 11)
        print calle_id

        pass
Esempio n. 5
0
 def setUp(self):
     '''
     '''
     config = Config()
     self.serviceFactory = ServiceFactory(config)
     self.coloniaDAO = self.serviceFactory.daos["coloniaDAO"]
     pass
Esempio n. 6
0
 def setUp(self):
     """
     """
     config = Config()
     self.serviceFactory = ServiceFactory(config)
     self.calleDAO = self.serviceFactory.daos["calleDAO"]
     pass
Esempio n. 7
0
def mainFunc():
    parser = OptionParser()
    parser.add_option("-c",
                      "--colonia",
                      dest="colonia",
                      help="nombre de la colonia")

    #(options, args) = parser.parse_args()
    (options, ) = parser.parse_args()

    logger.debug("colonia: %s" % options.colonia)

    # abrir la conexión de la base de datos
    config = Config()
    serviceFactory = ServiceFactory(config)

    mainProcess(options.colonia, serviceFactory)
    pass