Fix some functional tests for py3
This fixes test_reload_on_sighup and test_stack_outputs
for py3.
Change-Id: Ibfb8f4eca0391b13bfec7c1e7352f8c31f8adb84
diff --git a/functional/test_reload_on_sighup.py b/functional/test_reload_on_sighup.py
index 252cec8..f87669c 100644
--- a/functional/test_reload_on_sighup.py
+++ b/functional/test_reload_on_sighup.py
@@ -29,7 +29,8 @@
super(ReloadOnSighupTest, self).setUp()
def _is_mod_wsgi_daemon(self, service):
- process = ''.join(['wsgi:', service[:9]]).replace('_', '-')
+ process = ''.join(['wsgi:',
+ service[:9]]).replace('_', '-').encode('utf-8')
s = subprocess.Popen(["ps", "ax"], stdout=subprocess.PIPE)
for x in s.stdout:
if re.search(process, x):
diff --git a/functional/test_stack_outputs.py b/functional/test_stack_outputs.py
index 4bb67db..536e589 100644
--- a/functional/test_stack_outputs.py
+++ b/functional/test_stack_outputs.py
@@ -46,7 +46,8 @@
actual_list = self.client.stacks.output_list(
stack_identifier)['outputs']
- self.assertEqual(expected_list, actual_list)
+ sorted_actual_list = sorted(actual_list, key=lambda x: x['output_key'])
+ self.assertEqual(expected_list, sorted_actual_list)
expected_output_a = {
u'output_value': u'a', u'output_key': u'resource_output_a',