def delete(self): """Delete a dataset that was previously created using the REST API.""" datasets.delete_dataset(connection=self._connection, dataset_id=self._dataset_id) if self.verbose: print("Successfully deleted dataset ID: '{}'.".format(self._dataset_id))
def delete(self, verbose=False): """Delete a dataset that was previously created using the REST API. Args: verbose: If True, prints status information about the dataset upload. """ datasets.delete_dataset(connection=self._connection, dataset_id=self._dataset_id) if verbose: print("Successfully deleted dataset ID: '{}'.".format(self._dataset_id))
def test_delete_dataset(self, mock_delete): conn = microstrategy.Connection(base_url=BASE_URL, username=USERNAME, password=PASSWORD, project_name=PROJECT_NAME) mock_delete.return_value.status_code = 200 response = datasets.delete_dataset(conn, dataset_id=DATASET_ID) self.assertEqual(response.status_code, 200)
def delete(self, verbose=False): """Delete a dataset that was previously created using the REST API. Args: verbose: If True, prints status information about the dataset upload. """ response = datasets.delete_dataset(connection=self._connection, dataset_id=self._dataset_id) if not response.ok: self.__response_handler( response=response, msg="Error deleting dataset with ID: '{}'".format( self._dataset_id)) else: if verbose: print("Successfully deleted dataset ID: '{}'.".format( self._dataset_id))
def delete(self): """Delete a super cube that was created using the REST API.""" datasets.delete_dataset(connection=self._connection, id=self._id) if config.verbose: print("Successfully deleted super cube ID: '{}'.".format(self._id))