  def testGetMachineTypes(self, mock_gce_api):
    """Test getting the Machine Type API object."""
    machine_types_mock = mock_gce_api.return_value.machineTypes.return_value
    machine_types_mock.get.return_value.execute.return_value = gcp_mocks.MOCK_MACHINE_TYPES
    machine_type_name = 'c2-standard-30'
    machine_type = gcp_mocks.FAKE_ANALYSIS_PROJECT.compute.GetMachineTypes(
        machine_type_name, 'us-central1-a')
    self.assertEqual(machine_type_name, machine_type.get('name'))
    machine_types_mock.get.assert_called()
Test getting the Machine Type API object.
tests/providers/gcp/internal/test_compute.py