diff options
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_block_device.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/test_block_device.py b/nova/tests/test_block_device.py index b8e9b35e2..6a77d98ae 100644 --- a/nova/tests/test_block_device.py +++ b/nova/tests/test_block_device.py @@ -85,3 +85,9 @@ class BlockDeviceTestCase(test.TestCase): def test_strip_dev(self): self.assertEqual(block_device.strip_dev('/dev/sda'), 'sda') self.assertEqual(block_device.strip_dev('sda'), 'sda') + + def test_strip_prefix(self): + self.assertEqual(block_device.strip_prefix('/dev/sda'), 'a') + self.assertEqual(block_device.strip_prefix('a'), 'a') + self.assertEqual(block_device.strip_prefix('xvda'), 'a') + self.assertEqual(block_device.strip_prefix('vda'), 'a') |
