  def testGetBootVolumeConfigByAmi(self, mock_ec2_api):
    """Test that the boot volume configuration is correctly created."""
    # pylint: disable=protected-access,line-too-long
    mock_ec2_api.return_value.describe_images.return_value = aws_mocks.MOCK_DESCRIBE_AMI
    self.assertIsNone(
        aws_mocks.MOCK_DESCRIBE_AMI['Images'][0]['BlockDeviceMappings'][0]
        ['Ebs']['VolumeSize'])
    self.assertIsNone(
        aws_mocks.MOCK_DESCRIBE_AMI['Images'][0]['BlockDeviceMappings'][0]
        ['Ebs']['VolumeType'])
    config = aws_mocks.FAKE_AWS_ACCOUNT.ec2._GetBootVolumeConfigByAmi(
        'ami-id', 50, 'fake-volume-type')
    # pylint: enable=protected-access,line-too-long
    self.assertEqual(50, config['Ebs']['VolumeSize'])
    self.assertEqual('fake-volume-type', config['Ebs']['VolumeType'])
Test that the boot volume configuration is correctly created.
tests/providers/aws/internal/test_ec2.py