summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tempest_lib/tests/common/utils/test_data_utils.py7
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 08566f4..fca812e 100644
--- a/tempest_lib/tests/common/utils/test_data_utils.py
+++ b/tempest_lib/tests/common/utils/test_data_utils.py
@@ -48,6 +48,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)