Ejemplo n.º 1
0
 def test_remove_table(self):
     """remove() should remove a table"""
     url = "odbc://tuttle_test_db/test_table"
     res = ODBCResource(url)
     assert res.exists(), "{} should exist".format(url)
     res.remove()
     assert not res.exists(), "{} should not exist".format(url)
Ejemplo n.º 2
0
 def test_remove_partition(self):
     """remove() should remove a table"""
     partition_to_delete = "odbc://tuttle_test_db/test_partitionned_table_num?col_int=14"
     resource_to_delete = ODBCResource(partition_to_delete)
     assert resource_to_delete.exists(), "{} should exist".format(partition_to_delete)
     other_partition = "odbc://tuttle_test_db/test_partitionned_table_num?col_int=42"
     other_resource = ODBCResource(other_partition)
     assert resource_to_delete.exists(), "{} should exist".format(other_partition)
     resource_to_delete.remove()
     assert not resource_to_delete.exists(), "{} should not exist anymore".format(partition_to_delete)
     assert other_resource.exists(), "Other partition {} should still exist".format(other_partition)