def create_blob(blob, txt):
    uri = blob.uri
    host_base = cs.get_host_base_from_uri(uri)
    service = BlobService(blob.name,
                          blob.key,
                          host_base=host_base)
    
    container_name = cs.get_container_name_from_uri(uri)
    blob_name = cs.get_blob_name_from_uri(uri)
    service.put_block_blob_from_text(container_name,
                                     blob_name,
                                     txt)
 def test_get_blob_name_from_uri(self):
     uri = "http://qingfu2.blob.core.windows.net/vhds/abc.sh?st=2014-06-27Z&se=2014-06-27&sr=c&sp=r&sig=KBwcWOx"
     blob = cs.get_blob_name_from_uri(uri)
     self.assertEqual(blob, "abc.sh")
 def test_get_blob_name_from_uri(self):
     uri = "http://qingfu2.blob.core.windows.net/vhds/abc.sh?st=2014-06-27Z&se=2014-06-27&sr=c&sp=r&sig=KBwcWOx"
     blob = cs.get_blob_name_from_uri(uri)
     self.assertEqual(blob, "abc.sh")