summaryrefslogtreecommitdiff
path: root/heat/tests/test_nested_stack.py
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2019-11-20 19:37:27 +0100
committerHervé Beraud <hberaud@redhat.com>2020-04-23 14:49:12 +0200
commitd7d3dcbb505dff18dcfc964dbd5fca63085267cf (patch)
tree448e8dba7bda0431d32c280a15e813d320ade0a1 /heat/tests/test_nested_stack.py
parentea89a2a08c1293ffd99c2e7b198a7b0e6842b174 (diff)
downloadheat-d7d3dcbb505dff18dcfc964dbd5fca63085267cf.tar.gz
Remove six and python 2.7 full support
Six is in use to help us to keep support for python 2.7. Since the ussuri cycle we decide to remove the python 2.7 support so we can go ahead and also remove six usage from the python code. Review process and help ----------------------- Removing six introduce a lot of changes and an huge amount of modified files To simplify reviews we decided to split changes into several patches to avoid painful reviews and avoid mistakes. To review this patch you can use the six documentation [1] to obtain help and understand choices. Additional informations ----------------------- Changes related to 'six.b(data)' [2] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ six.b [2] encode the given datas in latin-1 in python3 so I did the same things in this patch. Latin-1 is equal to iso-8859-1 [3]. This encoding is the default encoding [4] of certain descriptive HTTP headers. I suggest to keep latin-1 for the moment and to move to another encoding in a follow-up patch if needed to move to most powerful encoding (utf8). HTML4 support utf8 charset and utf8 is the default charset for HTML5 [5]. Note that this commit message is autogenerated and not necesserly contains changes related to 'six.b' [1] https://six.readthedocs.io/ [2] https://six.readthedocs.io/#six.b [3] https://docs.python.org/3/library/codecs.html#standard-encodings [4] https://www.w3schools.com/charsets/ref_html_8859.asp [5] https://www.w3schools.com/html/html_charset.asp Patch 26 of a serie of 28 patches Change-Id: I861e30278e66b680cd64ef659ff889414d4e55fb
Diffstat (limited to 'heat/tests/test_nested_stack.py')
-rw-r--r--heat/tests/test_nested_stack.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/heat/tests/test_nested_stack.py b/heat/tests/test_nested_stack.py
index a4aa37bae..bd4f005d8 100644
--- a/heat/tests/test_nested_stack.py
+++ b/heat/tests/test_nested_stack.py
@@ -15,7 +15,6 @@
import mock
from oslo_config import cfg
from requests import exceptions
-import six
import yaml
from heat.common import exception
@@ -164,7 +163,7 @@ Resources:
res = self.assertRaises(exception.StackValidationFailed,
stack.validate)
- self.assertIn('Recursion depth exceeds', six.text_type(res))
+ self.assertIn('Recursion depth exceeds', str(res))
calls = [mock.call('https://server.test/depth1.template'),
mock.call('https://server.test/depth2.template'),
@@ -229,7 +228,7 @@ Resources:
tr.return_value = 2
res = self.assertRaises(exception.StackValidationFailed,
stack.validate)
- self.assertIn('Recursion depth exceeds', six.text_type(res))
+ self.assertIn('Recursion depth exceeds', str(res))
expected_count = cfg.CONF.get('max_nested_stack_depth') + 1
self.assertEqual(expected_count, urlfetch.get.call_count)