  def testCreateStorageAccount(self, mock_create, mock_list_keys):
    """Test that a storage account is created and its information retrieved"""
    # pylint: disable=protected-access
    mock_create.return_value.result.return_value = azure_mocks.MOCK_STORAGE_ACCOUNT
    mock_list_keys.return_value = azure_mocks.MOCK_LIST_KEYS
    account_id, account_key = azure_mocks.FAKE_ACCOUNT.storage.CreateStorageAccount(
        'fakename')
    self.assertEqual('fakestorageid', account_id)
    self.assertEqual('fake-key-value', account_key)

    with self.assertRaises(errors.InvalidNameError) as error:
      _, _ = azure_mocks.FAKE_ACCOUNT.storage.CreateStorageAccount(
          'fake-non-conform-name')
    # pylint: enable=protected-access
    self.assertEqual('Storage account name fake-non-conform-name does not '
                     'comply with ^[a-z0-9]{1,24}$', str(error.exception))
Test that a storage account is created and its information retrieved
tests/providers/azure/internal/test_storage.py