diff options
-rw-r--r-- | tempest_lib/tests/common/utils/test_data_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tempest_lib/tests/common/utils/test_data_utils.py b/tempest_lib/tests/common/utils/test_data_utils.py index a231964..e8a7c33 100644 --- a/tempest_lib/tests/common/utils/test_data_utils.py +++ b/tempest_lib/tests/common/utils/test_data_utils.py @@ -49,6 +49,13 @@ class TestDataUtils(base.TestCase): self.assertTrue(actual.startswith('foo')) self.assertNotEqual(actual, actual2) + def test_rand_name_with_prefix(self): + actual = data_utils.rand_name(prefix='prefix-str') + self.assertIsInstance(actual, str) + self.assertRegexpMatches(actual, "^prefix-str-") + actual2 = data_utils.rand_name(prefix='prefix-str') + self.assertNotEqual(actual, actual2) + def test_rand_url(self): actual = data_utils.rand_url() self.assertIsInstance(actual, str) |