def main(): import gites.calendar.scripts parseZCML(gites.calendar.scripts, 'activity.zcml') pg = getUtility(IDatabase, 'postgres') pg.session checker = CalendarActivity(pg) checker.connect() checker.checkCalendarActivity()
def main(): import gites.calendar.scripts parseZCML(gites.calendar.scripts, 'calendar_import.zcml') pg = getUtility(IDatabase, 'postgres') pg.session initialize_declarative_mappers(DeclarativeBase, pg.metadata) initialize_defered_mappers(pg.metadata) WalhebConsumingServer('walhebcalendar', '') connect_all() asyncore.loop()
def main(): import gites.calendar.scripts parseZCML(gites.calendar.scripts, 'calendar.zcml') pg = PGDB('jfroche', 'xxxxxxx', 'localhost', 5432, 'gites_wallons') connString = 'postgres://*****:*****@localhost/gites_wallons' createSAWrapper(connString, forZope=True, engine_options = {'convert_unicode': True, 'encoding': 'utf-8'}, encoding='utf-8', name='gites_wallons', model='GitesMappings') exporter = ExportCalendarActivity(pg) exporter.connect() exporter.export()
def setUp(self): super(ExportCalendarActivityTest, self).setUp() import gites.calendar.scripts parseZCML(gites.calendar.scripts, 'calendar_testing.zcml') self.exporter = ExportCalendarActivity(self.pg) self.exporter.connect()