Adam Litke has uploaded a new change for review. Change subject: tests: Add gen_uuid test helper ......................................................................
tests: Add gen_uuid test helper The test code is sprinkled with lots of boilerplate code to generate UUIDs in the proper format. Add a helper to testlib so we can reduce this duplicated logic in tests. Change-Id: I622928911c3f07739fd61f61a58cee2e692c7eeb Signed-off-by: Adam Litke <ali...@redhat.com> --- M tests/testlib.py 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/64542/1 diff --git a/tests/testlib.py b/tests/testlib.py index c341c24..b75e7a2 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -28,6 +28,7 @@ import pickle import platform import unittest +import uuid from functools import wraps import shutil import sys @@ -588,3 +589,10 @@ """ while job.active: time.sleep(1) + + +def gen_uuid(): + """ + Return a new UUID in the format used for all vdsm APIs that accept UUIDs. + """ + return str(uuid.uuid4()) -- To view, visit https://gerrit.ovirt.org/64542 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I622928911c3f07739fd61f61a58cee2e692c7eeb Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <ali...@redhat.com> _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org