def setUpClass(cls):
     if not skip_postgres_tests():
         TestWithPostgres.config = parse_config_from_dict(CONFIG_DATA)
         TestWithPostgres.config.dbconfig.host = "localhost"
         TestWithPostgres.config.dbconfig.dbname = 'pred'
         TestWithPostgres.config.dbconfig.user = '******'
         run_sql_command(TestWithPostgres.config)
Exemple #2
0
 def setUpClass(cls):
     if not skip_postgres_tests():
         TestWithPostgres.config = parse_config_from_dict(CONFIG_DATA)
         TestWithPostgres.config.dbconfig.host = "localhost"
         TestWithPostgres.config.dbconfig.dbname = 'pred'
         TestWithPostgres.config.dbconfig.user = '******'
         run_sql_command(TestWithPostgres.config)
 def test_parsed_config(self):
     config = parse_config_from_dict(CONFIG_DATA)
     self.assertEqual(5000, config.binding_max_offset)
     self.assertEqual("/tmp/pred_data", config.download_dir)
     self.assertEqual("someModelURL", config.model_base_url)
     self.assertEqual(["someTracksURL"], config.model_tracks_url_list)
     genomes_setup = config.get_genomes_setup()
     self.assertEqual(1, len(genomes_setup))
     hg19 = genomes_setup["hg19"]
     self.assertEqual(TRACKHUB_URL, hg19["trackhubUrl"])
     self.assertEqual("goldenPath/hg19/bigZips/hg19.2bit", hg19["genomeFile"])
     self.assertEqual(["knowngene"], hg19["geneLists"])
     self.assertEqual("E2F1_0001(JS)", hg19["models"][0]["name"])
     self.assertEqual(set(["E2F1_0001(JS)"]), config.get_all_model_names())
 def test_parsed_config(self):
     config = parse_config_from_dict(CONFIG_DATA)
     self.assertEqual(5000, config.binding_max_offset)
     self.assertEqual('/tmp/pred_data', config.download_dir)
     self.assertEqual('someModelURL', config.model_base_url)
     self.assertEqual('someTracksURL', config.model_tracks_url)
     genomes_setup = config.get_genomes_setup()
     self.assertEqual(1, len(genomes_setup))
     hg19 = genomes_setup['hg19']
     self.assertEqual(TRACKHUB_URL, hg19['trackhubUrl'])
     self.assertEqual('goldenPath/hg19/bigZips/hg19.2bit',
                      hg19['genomeFile'])
     self.assertEqual(['knowngene'], hg19['geneLists'])
     self.assertEqual('E2F1_0001(JS)', hg19['models'][0]['name'])
     self.assertEqual(set(['E2F1_0001(JS)']), config.get_all_model_names())