  def testGetInstance(self, mock_list_instances, mock_provider):
    """Test that a particular instance from an account is retrieved."""
    mock_provider.return_value = azure_mocks.MOCK_CAPACITY_PROVIDER
    mock_list_instances.return_value = azure_mocks.MOCK_LIST_INSTANCES
    instance = azure_mocks.FAKE_ACCOUNT.compute.GetInstance('fake-vm-name')
    self.assertEqual('fake-vm-name', instance.name)
    self.assertEqual(
        '/subscriptions/sub/resourceGroups/fake-resource-group'
        '/providers/Microsoft.Compute/type/fake-vm-name', instance.resource_id)
    self.assertEqual('fake-resource-group', instance.resource_group_name)
    self.assertEqual('fake-region', instance.region)
    self.assertEqual(['fake-zone'], instance.zones)
Test that a particular instance from an account is retrieved.
tests/providers/azure/internal/test_compute.py