def test_all_versions_no_current(self):
    bucket_uri = self.CreateVersionedBucket()
    key_uri = bucket_uri.clone_replace_name('foo')
    key_uri.set_contents_from_string('bar')
    g1 = urigen(key_uri)
    key_uri.set_contents_from_string('baz')
    g2 = urigen(key_uri)
    self._RunRemoveCommandAndCheck(
        ['-m', 'rm', '-a', suri(key_uri)],
        objects_to_remove=['%s#%s' % (suri(key_uri), g1),
                           '%s#%s' % (suri(key_uri), g2)])
    self.AssertNObjectsInBucket(bucket_uri, 0, versioned=True)
Test that 'rm -a' for an object without a current version works.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/test_rm.py/TestRm.test_all_versions_no_current