Changeset 201


Ignore:
Timestamp:
Sep 7, 2009, 2:08:26 PM (11 years ago)
Author:
pvkouteren
Message:

Modified test file to only generate serializers for testing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • patricktest.py

    r199 r201  
    182182   
    183183''' New new test '''
     184'''
    184185import container
    185186from container import iany,iall,readfile,writefile, postgres
     
    263264    timelogger.log("".join(result))
    264265cd.close()
     266'''
     267
     268''' Test generation of IbidasSerializers and IbidasMessage '''
     269from web.model.setup_serializers import SerializerGenerator
     270import os
     271import config
     272import container
     273from container import postgres
     274
     275_ConfigDefault = {
     276    "database.name":                "ibidas_test_nieuw",
     277    "database.user":                "ibidas",
     278    "database.password":            "ibidas",
     279    "database.host":                "127.0.0.1",
     280    "database.port":                "5432"
     281}
     282
     283
     284testconfig = config.loadConfig('ibidas.ini',_ConfigDefault)
     285cd = postgres.openConnection(testconfig['database.host'],\
     286                testconfig['database.port'],testconfig['database.name'],\
     287                testconfig['database.user'],testconfig['database.password']).getConSet()
     288cursor = cd.getSingletonCursor()
     289folder = os.getcwd() + "/web/model"
     290sg = SerializerGenerator(folder)
     291sg.generate(cursor, cd._getTables())
Note: See TracChangeset for help on using the changeset viewer.