

def test_storage_url_from_string(self):
    storage_url = StorageUrlFromString('abc')
    self.assertTrue(storage_url.IsFileUrl())
    self.assertEquals('abc', storage_url.object_name)
    storage_url = StorageUrlFromString('file://abc/123')
    self.assertTrue(self.IsFileUrl())
    self.assertEquals('abc/123', storage_url.object_name)
    storage_url = StorageUrlFromString('gs://abc/123')
    self.assertTrue(storage_url.IsCloudUrl())
    self.assertEquals('abc', storage_url.bucket_name)
    self.assertEquals('123', storage_url.object_name)
    storage_url = StorageUrlFromString('s3://abc/123')
    self.assertTrue(storage_url.IsCloudUrl())
    self.assertEquals('abc', storage_url.bucket_name)
    self.assertEquals('123', storage_url.object_name)

dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/test_storage_url.py TestStorageUrl.test_storage_url_from_string/VarMisuse@50/85 `storage_url`->`self`