  def testListVolumes(self, mock_ec2_api):
    """Test that volumes of an account are correctly listed."""
    describe_volumes = mock_ec2_api.return_value.describe_volumes
    describe_volumes.return_value = aws_mocks.MOCK_DESCRIBE_VOLUMES
    volumes = aws_mocks.FAKE_AWS_ACCOUNT.ebs.ListVolumes()
    self.assertEqual(2, len(volumes))
    self.assertIn('fake-volume-id', volumes)
    self.assertIn('fake-boot-volume-id', volumes)
    self.assertEqual('fake-zone-2', volumes['fake-volume-id'].region)
    self.assertEqual(
        'fake-zone-2b', volumes['fake-volume-id'].availability_zone)

    describe_volumes.return_value = aws_mocks.MOCK_DESCRIBE_VOLUMES_TAGS
    volumes = aws_mocks.FAKE_AWS_ACCOUNT.ebs.ListVolumes()
    self.assertIn('fake-boot-volume-id', volumes)
    self.assertEqual('fake-boot-volume', volumes['fake-boot-volume-id'].name)
    self.assertEqual('/dev/spf', volumes['fake-boot-volume-id'].device_name)
Test that volumes of an account are correctly listed.
tests/providers/aws/internal/test_ebs.py