'>>> driver = DummyStorageDriver(\'key\', \'secret\')
>>> 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={})
>>> obj #doctest: +ELLIPSIS
<Object: name=test object, size=50, ...>
>>> container.delete_object(obj=obj)
True
>>> obj = Object(name=\'test object 2\',
...    size=1000, hash=None, extra=None,
...    meta_data=None, container=container,driver=None)
>>> container.delete_object(obj=obj) #doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
ObjectDoesNotExistError:
@inherits: :class:`StorageDriver.delete_object`'

def delete_object(self, obj):

    container_name = obj.container.name
    object_name = obj.name
    obj = self.get_object(container_name=container_name, object_name=object_name)
    del self._containers[container_name]['objects'][object_name]
    return True
