Ejemplo n.º 1
0
 def test_get_db_path(self):
     db_path = tempfile.mkdtemp()
     batch_info_database = "database.db"
     redi.get_db_path(batch_info_database, db_path)
     full_db_path = os.path.join(batch_info_database, db_path)
     assert os.path.exists(full_db_path) == 1
     shutil.rmtree(full_db_path)
Ejemplo n.º 2
0
 def test_get_db_path(self):
     db_path = tempfile.mkdtemp()
     batch_info_database = "database.db"
     redi.get_db_path(batch_info_database, db_path)
     full_db_path = os.path.join(batch_info_database, db_path)
     assert os.path.exists(full_db_path) == 1
     shutil.rmtree(full_db_path)
Ejemplo n.º 3
0
 def test_get_db_path_not_exists(self):
     # verify that db path is created if it doesn't exist
     db_path = "nonExistentPath"
     batch_info_database = "database.db"
     created_db_path = redi.get_db_path(batch_info_database, db_path)
     assert created_db_path == os.path.join(db_path, batch_info_database)
     shutil.rmtree(db_path)
Ejemplo n.º 4
0
 def test_get_db_path_not_exists(self):
     # verify that db path is created if it doesn't exist
     db_path =  "nonExistentPath"
     batch_info_database = "database.db"
     created_db_path = redi.get_db_path(batch_info_database, db_path)
     assert created_db_path ==  os.path.join(db_path, batch_info_database)
     shutil.rmtree(db_path)