tests/OBSLocal: provide randomString() for ensuring tools not name dependent.
This commit is contained in:
parent
e7d8c9857e
commit
5a5d60b5f6
@ -158,6 +158,13 @@ class TestCase(unittest.TestCase):
|
||||
if comment:
|
||||
self.assertEqual(review.comment, comment)
|
||||
|
||||
def randomString(self, prefix='', length=None):
|
||||
if prefix and not prefix.endswith('_'):
|
||||
prefix += '_'
|
||||
if not length:
|
||||
length = random.randint(10, 30)
|
||||
return prefix + ''.join([random.choice(string.ascii_letters) for i in range(length)])
|
||||
|
||||
|
||||
class StagingWorkflow(object):
|
||||
def __init__(self, project=PROJECT):
|
||||
|
Loading…
x
Reference in New Issue
Block a user