  def testSnapshot(self, mock_ec2_api):
    """Test that a snapshot of the volume is created."""
    snapshot = mock_ec2_api.return_value.create_snapshot
    snapshot.return_value = aws_mocks.MOCK_CREATE_SNAPSHOT
    mock_ec2_api.return_value.get_waiter.return_value.wait.return_value = None

    # Snapshot(tags=None). Snapshot name should be the volume's id.
    snapshot = aws_mocks.FAKE_VOLUME.Snapshot()
    self.assertIsInstance(snapshot, ebs.AWSSnapshot)
    self.assertEqual('fake-volume-id-snapshot', snapshot.name)

    # Snapshot(tags={'Name': 'my-snapshot'}). Snapshot should be 'my-snapshot'.
    snapshot = aws_mocks.FAKE_VOLUME.Snapshot(tags={'Name': 'my-snapshot'})
    self.assertIsInstance(snapshot, ebs.AWSSnapshot)
    self.assertEqual('my-snapshot', snapshot.name)
Test that a snapshot of the volume is created.
tests/providers/aws/internal/test_ebs.py