devtools/__init__.py
changeset 9519 32662203e334
parent 9498 a76ac18f09c4
child 9576 5d4f662f5e31
equal deleted inserted replaced
9513:a7e0746f010c 9519:32662203e334
   543 
   543 
   544     def __init__(self, config):
   544     def __init__(self, config):
   545         super(PostgresTestDataBaseHandler, self).__init__(config)
   545         super(PostgresTestDataBaseHandler, self).__init__(config)
   546         datadir = join(self.config.apphome, 'pgdb')
   546         datadir = join(self.config.apphome, 'pgdb')
   547         if not exists(datadir):
   547         if not exists(datadir):
   548             subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8'])
   548             subprocess.check_call(['initdb', '-D', datadir, '-E', 'utf-8', '--locale=C'])
   549         port = self.system_source['db-port']
   549         port = self.system_source['db-port']
   550         subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k /tmp -p %s' % port])
   550         subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k /tmp -p %s' % port])
   551         self.__CTL.add(datadir)
   551         self.__CTL.add(datadir)
   552 
   552 
   553     @property
   553     @property