summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2012-12-19 18:53:54 -0500
committerSean Dague <sdague@linux.vnet.ibm.com>2012-12-19 18:53:54 -0500
commit0b8e6f235d1edbd2a0530ece5d79fcaa27cc1a8f (patch)
tree551844b9dbcb1eaa7460827fac1f5667a4de2e64
parent95a12808751673dd683a6a6e0904517096340f05 (diff)
downloadnova-0b8e6f235d1edbd2a0530ece5d79fcaa27cc1a8f.tar.gz
nova-0b8e6f235d1edbd2a0530ece5d79fcaa27cc1a8f.tar.xz
nova-0b8e6f235d1edbd2a0530ece5d79fcaa27cc1a8f.zip
address uuid overwriting
uuid was being used as a variable and as an import, change the import so that we don't have a naming collision. Probably harmless, but bad form. Change-Id: I99a0a372a62405b309e01d89b516df100b3e278c
-rw-r--r--nova/tests/integrated/test_api_samples.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py
index 49ff77306..c98a6f077 100644
--- a/nova/tests/integrated/test_api_samples.py
+++ b/nova/tests/integrated/test_api_samples.py
@@ -19,7 +19,7 @@ import inspect
import os
import re
import urllib
-import uuid
+import uuid as uuid_lib
from lxml import etree
@@ -938,7 +938,7 @@ class SchedulerHintsJsonTest(ApiSampleTestBase):
def test_scheduler_hints_post(self):
"""Get api sample of scheduler hint post request"""
hints = {'image_id': fake.get_valid_image_id(),
- 'image_near': str(uuid.uuid4())
+ 'image_near': str(uuid_lib.uuid4())
}
response = self._do_post('servers', 'scheduler-hints-post-req',
hints)
@@ -1182,7 +1182,7 @@ class KeyPairsSampleJsonTest(ApiSampleTestBase):
def test_keypairs_post(self, public_key=None):
"""Get api sample of key pairs post request"""
- key_name = 'keypair-' + str(uuid.uuid4())
+ key_name = 'keypair-' + str(uuid_lib.uuid4())
response = self._do_post('os-keypairs', 'keypairs-post-req',
{'keypair_name': key_name})
subs = self._get_regexes()
@@ -1196,7 +1196,7 @@ class KeyPairsSampleJsonTest(ApiSampleTestBase):
def test_keypairs_import_key_post(self):
"""Get api sample of key pairs post to import user's key"""
- key_name = 'keypair-' + str(uuid.uuid4())
+ key_name = 'keypair-' + str(uuid_lib.uuid4())
subs = {
'keypair_name': key_name,
'public_key': "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDx8nkQv/zgGg"
@@ -1321,7 +1321,7 @@ class CloudPipeSampleJsonTest(ApiSampleTestBase):
def test_cloud_pipe_create(self):
"""Get api samples of cloud pipe extension creation"""
self.flags(vpn_image_id=fake.get_valid_image_id())
- project = {'project_id': 'cloudpipe-' + str(uuid.uuid4())}
+ project = {'project_id': 'cloudpipe-' + str(uuid_lib.uuid4())}
response = self._do_post('os-cloudpipe', 'cloud-pipe-create-req',
project)
self.assertEqual(response.status, 200)