  def testGetInstanceType(self, mock_list_instance_types, mock_provider, mock_quota):
    """Test that the instance type given a configuration is correct."""
    mock_quota.return_value = azure_mocks.MOCK_QUOTA
    mock_provider.return_value = azure_mocks.MOCK_CAPACITY_PROVIDER
    # pylint: disable=protected-access
    mock_list_instance_types.return_value = azure_mocks.MOCK_REQUEST_VM_SIZE
    instance_type = azure_mocks.FAKE_ACCOUNT.compute._GetInstanceType(4, 8192)
    self.assertEqual('fake-vm-type', instance_type)

    with self.assertRaises(ValueError):
      azure_mocks.FAKE_ACCOUNT.compute._GetInstanceType(666, 666)
Test that the instance type given a configuration is correct.
tests/providers/azure/internal/test_compute.py