def delete_container(self, container):
        """
        >>> driver = DummyStorageDriver('key', 'secret')
        >>> container = Container(name = 'test container', extra={'object_count': 0}, driver=driver)
        >>> driver.delete_container(container=container) #doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ContainerDoesNotExistError:
        >>> container = driver.create_container(container_name='test container 1') #doctest: +IGNORE_EXCEPTION_DETAIL
        >>> len(driver._containers)
        1
        >>> driver.delete_container(container=container)
        True
        >>> len(driver._containers)
        0
        >>> container = driver.create_container(container_name='test container 1') #doctest: +IGNORE_EXCEPTION_DETAIL
        >>> obj = container.upload_object_via_stream(object_name='test object', iterator=DummyFileObject(5, 10), extra={})
        >>> driver.delete_container(container=container) #doctest: +IGNORE_EXCEPTION_DETAIL
        Traceback (most recent call last):
        ContainerIsNotEmptyError:
        """

        container_name = container.name
        if container_name not in self._containers:
           raise ContainerDoesNotExistError(container_name=container_name,
                                            value=None, driver=self)

        container = self._containers[container_name]
        if len(container['objects']) > 0:
           raise ContainerIsNotEmptyError(container_name=container_name,
                                          value=None, driver=self)

        del self._containers[container_name]
        return True
dataset/ETHPy150Open cloudkick/libcloud/libcloud/storage/drivers/dummy.py/DummyStorageDriver.delete_container/original