CLOUDSTACK-7127: Fix for addRegion failure, avoiding regionid 1 while creating new region through test case

(cherry picked from commit ca59f01602)
This commit is contained in:
Gaurav Aradhye 2014-07-24 13:38:38 +05:30 committed by Daan Hoogland
parent 724c8dc7c9
commit d5220a88a0
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class TestRegions(cloudstackTestCase):
return
def setUp(self):
pseudo_random_int = choice(xrange(1, 200))
pseudo_random_int = choice(xrange(2, 200))
self.services["region"]["regionid"] = pseudo_random_int
self.services["region"]["regionname"] = "region" + str(pseudo_random_int)
self.services["region"]["regionendpoint"] = "http://region" + str(pseudo_random_int) + ":8080/client"
@ -78,7 +78,7 @@ class TestRegions(cloudstackTestCase):
def test_createRegionWithExistingRegionName(self):
"""Test for duplicate checks on region name
"""
random_int = choice(xrange(1, 200))
random_int = choice(xrange(2, 200))
self.services["region"]["regionid"] = random_int #alter id but not name
self.services["region"]["regionendpoint"] = "http://region" + str(random_int) + ":8080/client"
self.assertRaises(Exception, Region.create, self.api_client, self.services["region"])