Drop unicode prefix from integration tests
It is no longer required in Python 3 because strings are by default unicode strings. Change-Id: I7eae306438de68c51afb903b434810b7d591c4a7
This commit is contained in:
parent
d06457bccb
commit
c0c338748a
@ -500,7 +500,7 @@ resources:
|
||||
|
||||
# Parent resources should be unchanged and the nested stack
|
||||
# should have been updated in-place without replacement
|
||||
self.assertEqual({u'test1': u'My::TestResource2'},
|
||||
self.assertEqual({'test1': 'My::TestResource2'},
|
||||
self.list_resources(stack_identifier))
|
||||
rsrc = self.client.resources.get(stack_identifier, 'test1')
|
||||
self.assertEqual(rsrc.physical_resource_id, nested_id)
|
||||
@ -551,7 +551,7 @@ resources:
|
||||
provider_stack = self.client.stacks.get(rsrc.physical_resource_id)
|
||||
provider_identifier = '%s/%s' % (provider_stack.stack_name,
|
||||
provider_stack.id)
|
||||
provider_resources = {u'test1': u'OS::Heat::TestResource'}
|
||||
provider_resources = {'test1': 'OS::Heat::TestResource'}
|
||||
self.assertEqual(provider_resources,
|
||||
self.list_resources(provider_identifier))
|
||||
|
||||
@ -678,7 +678,7 @@ resources:
|
||||
self.update_stack(stack_identifier,
|
||||
parameters={'do_fail': False},
|
||||
existing=True)
|
||||
self.assertEqual({u'aresource': u'OS::Heat::TestResource'},
|
||||
self.assertEqual({'aresource': 'OS::Heat::TestResource'},
|
||||
self.list_resources(stack_identifier))
|
||||
|
||||
def test_stack_update_with_new_env(self):
|
||||
|
@ -71,7 +71,7 @@ resources:
|
||||
environment=env
|
||||
)
|
||||
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
|
||||
# Check we created an empty nested stack
|
||||
@ -116,7 +116,7 @@ resources:
|
||||
create_template = self.template.replace("count: 0", "count: 2")
|
||||
stack_identifier = self.stack_create(template=create_template,
|
||||
environment=env)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
|
||||
# validate count, type and name of resources in a resource group.
|
||||
@ -190,7 +190,7 @@ resources:
|
||||
create_template = self.template.replace("count: 0", "count: 2")
|
||||
stack_identifier = self.stack_create(template=create_template,
|
||||
environment=env)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
# verify that the resource group has 2 resources
|
||||
self._validate_resources(stack_identifier, 2)
|
||||
@ -222,15 +222,15 @@ resources:
|
||||
|
||||
# create stack with resource group, initial count 5
|
||||
stack_identifier = self.stack_create(template=rp_template)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
group_resources = self.list_group_resources(stack_identifier,
|
||||
'random_group')
|
||||
expected_resources = {u'0': u'OS::Heat::RandomString',
|
||||
u'1': u'OS::Heat::RandomString',
|
||||
u'2': u'OS::Heat::RandomString',
|
||||
u'3': u'OS::Heat::RandomString',
|
||||
u'4': u'OS::Heat::RandomString'}
|
||||
expected_resources = {'0': 'OS::Heat::RandomString',
|
||||
'1': 'OS::Heat::RandomString',
|
||||
'2': 'OS::Heat::RandomString',
|
||||
'3': 'OS::Heat::RandomString',
|
||||
'4': 'OS::Heat::RandomString'}
|
||||
self.assertEqual(expected_resources, group_resources)
|
||||
|
||||
# Remove three, specifying the middle resources to be removed
|
||||
@ -240,11 +240,11 @@ resources:
|
||||
self.update_stack(stack_identifier, update_template)
|
||||
group_resources = self.list_group_resources(stack_identifier,
|
||||
'random_group')
|
||||
expected_resources = {u'0': u'OS::Heat::RandomString',
|
||||
u'4': u'OS::Heat::RandomString',
|
||||
u'5': u'OS::Heat::RandomString',
|
||||
u'6': u'OS::Heat::RandomString',
|
||||
u'7': u'OS::Heat::RandomString'}
|
||||
expected_resources = {'0': 'OS::Heat::RandomString',
|
||||
'4': 'OS::Heat::RandomString',
|
||||
'5': 'OS::Heat::RandomString',
|
||||
'6': 'OS::Heat::RandomString',
|
||||
'7': 'OS::Heat::RandomString'}
|
||||
self.assertEqual(expected_resources, group_resources)
|
||||
|
||||
def test_props_update(self):
|
||||
@ -255,7 +255,7 @@ resources:
|
||||
template_one = self.template.replace("count: 0", "count: 1")
|
||||
stack_identifier = self.stack_create(template=template_one,
|
||||
environment=env)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
|
||||
initial_nested_ident = self.group_nested_identifier(stack_identifier,
|
||||
@ -287,7 +287,7 @@ resources:
|
||||
template_one = self.template.replace("count: 0", "count: 2")
|
||||
stack_identifier = self.stack_create(template=template_one,
|
||||
environment=env)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
|
||||
initial_nested_ident = self.group_nested_identifier(stack_identifier,
|
||||
@ -349,7 +349,7 @@ outputs:
|
||||
stack_identifier = self.stack_create(template=template_one,
|
||||
environment=env,
|
||||
files=files1)
|
||||
self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
|
||||
self.assertEqual({'random_group': 'OS::Heat::ResourceGroup'},
|
||||
self.list_resources(stack_identifier))
|
||||
self.assertEqual(files1, self.client.stacks.files(stack_identifier))
|
||||
|
||||
@ -397,7 +397,7 @@ resources:
|
||||
'Environment': {'event_sinks': [],
|
||||
'parameter_defaults': {},
|
||||
'parameters': {},
|
||||
'resource_registry': {u'resources': {}}},
|
||||
'resource_registry': {'resources': {}}},
|
||||
'Parameters': {
|
||||
'the_count': {'Description': '',
|
||||
'Label': 'the_count',
|
||||
|
@ -28,15 +28,15 @@ test_template = {
|
||||
}
|
||||
}
|
||||
|
||||
env_both_restrict = {u'resource_registry': {
|
||||
u'resources': {
|
||||
env_both_restrict = {'resource_registry': {
|
||||
'resources': {
|
||||
'bar': {'restricted_actions': ['update', 'replace']}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
env_replace_restrict = {u'resource_registry': {
|
||||
u'resources': {
|
||||
env_replace_restrict = {'resource_registry': {
|
||||
'resources': {
|
||||
'*ar': {'restricted_actions': 'replace'}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ from heat_integrationtests.functional import functional_base
|
||||
class SimpleStackValidationTest(functional_base.FunctionalTestsBase):
|
||||
|
||||
def test_validate_json_content(self):
|
||||
template = u'''
|
||||
template = '''
|
||||
heat_template_version: rocky
|
||||
resources:
|
||||
server:
|
||||
|
Loading…
Reference in New Issue
Block a user