From 3f17e9d5ed0be99edb6c95a420e616e9bee6a9ce Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 15 Dec 2014 14:13:39 -0700 Subject: [PATCH] Test's random name gen now uses uuid4 This test used a random integer to generate the name of a file. Although it doesn't pose a real problem, it's probably better just to drop a UUID in instead of a 3-digit number, to avoid collisions. Partially implements blueprint: selenium-integration-testing Change-Id: I95fd2c25dc4e2e5ddc47cd390b472c8ee2310e97 Closes-Bug: 1399219 --- .../test/integration_tests/tests/test_keypair.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openstack_dashboard/test/integration_tests/tests/test_keypair.py b/openstack_dashboard/test/integration_tests/tests/test_keypair.py index e217461722..8d7f30b166 100644 --- a/openstack_dashboard/test/integration_tests/tests/test_keypair.py +++ b/openstack_dashboard/test/integration_tests/tests/test_keypair.py @@ -13,14 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. -import random +import uuid from openstack_dashboard.test.integration_tests import helpers class TestKeypair(helpers.TestCase): """Checks that the user is able to create/delete keypair.""" - KEYPAIR_NAME = 'horizonkeypair' + str(random.randint(0, 1000)) + KEYPAIR_NAME = 'horizonkeypair_' + str(uuid.uuid4()) def test_keypair(self): accesssecurity_page = self.home_pg.go_to_accesssecurity_page()