示例#1
0
 def setup_test_environment(self, **kwargs):
     DjangoTestSuiteRunner.setup_test_environment(self, **kwargs)
     settings.ECILOP_PORT = paths.ECILOP_PORT = 9865
     paths.ROOT = paths.RootPath(TEST_ROOT_PATH)
     paths.create_paths(True)
     tablespace_paths = []
     for i in range(TEST_DRAFT_COUNT):
         draft_path = paths.ROOT.drafts[str(i)]
         os.makedirs(draft_path.tablespace)
         tablespace_paths.append(draft_path.tablespace)
         os.mkdir(draft_path.apps)
         os.mkdir(draft_path.libs)
         os.mkdir(draft_path.grantors)
         write_file(draft_path.config, '{}')
         write_file(draft_path.rsa_pub, 'public key')
     Popen(['sudo', 'chown', 'postgres'] + tablespace_paths).wait()
     os.symlink('0', paths.ROOT.drafts.curr)
     self._ecilop_process = Popen(
         [paths.ECILOP_EXE_PATH, '--config', paths.ROOT.etc.ecilop_conf],
         stdout=PIPE)
     self._ecilop_process.stdout.readline()
     self._ecilop_process.stdout.readline()
示例#2
0
 def setup_test_environment(self, **kwargs):
     DjangoTestSuiteRunner.setup_test_environment(self, **kwargs)
     settings.ECILOP_PORT = paths.ECILOP_PORT = 9865
     paths.ROOT = paths.RootPath(TEST_ROOT_PATH)
     paths.create_paths(True)
     tablespace_paths = []
     for i in range(TEST_DRAFT_COUNT):
         draft_path = paths.ROOT.drafts[str(i)]
         os.makedirs(draft_path.tablespace)
         tablespace_paths.append(draft_path.tablespace)
         os.mkdir(draft_path.apps)
         os.mkdir(draft_path.libs)
         os.mkdir(draft_path.grantors)
         write_file(draft_path.config, '{}')
         write_file(draft_path.rsa_pub, 'public key')
     Popen(['sudo', 'chown', 'postgres'] + tablespace_paths).wait()
     os.symlink('0', paths.ROOT.drafts.curr)
     self._ecilop_process = Popen(
         [paths.ECILOP_EXE_PATH, '--config', paths.ROOT.etc.ecilop_conf],
         stdout=PIPE)
     self._ecilop_process.stdout.readline()
     self._ecilop_process.stdout.readline()
示例#3
0
 def setUp(self):
     create_paths()
     self.client = Client()
     connection._set_isolation_level(0)
示例#4
0
 def setUp(self):
     create_paths()
     self.client = Client()
     connection._set_isolation_level(0)