  def testGenerateDiskName(self):
    """Test that disk names are correctly generated.

    The disk name must comply with the following RegEx: ^[\\w]{1,80}$
        i.e., it must be between 1 and 80 chars and be within [a-zA-Z0-9].
    """
    disk_name = common.GenerateDiskName(azure_mocks.FAKE_SNAPSHOT)
    self.assertEqual('fake_snapshot_name_c4a46ad7_copy', disk_name)

    disk_name = common.GenerateDiskName(
        azure_mocks.FAKE_SNAPSHOT, disk_name_prefix='prefix')
    self.assertEqual('prefix_fake_snapshot_name_c4a46ad7_copy', disk_name)
Test that disk names are correctly generated.

The disk name must comply with the following RegEx: ^[\\w]{1,80}$
i.e., it must be between 1 and 80 chars and be within [a-zA-Z0-9].
tests/providers/azure/internal/test_common.py