From bf76012fba4bac735be5007859ddbd4a91197e28 Mon Sep 17 00:00:00 2001 From: Girish Shilamkar Date: Thu, 27 Mar 2014 19:00:27 -0400 Subject: [PATCH] Fix problem string comparison with unicode Conflicts: test/integration/component/test_egress_fw_rules.py --- test/integration/component/test_egress_fw_rules.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py index 4f3819f4327..8da37381bb5 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -274,17 +274,19 @@ class TestEgressFWRules(cloudstackTestCase): self.debug("script: %s" % script+exec_cmd_params) self.debug("result: %s" % result) - if str(result).strip() == expected_result: + str_result = str(str(result).strip()) + str_expected_result = str(expected_result).strip() + if str_result == str_expected_result: exec_success = True if negative_test: self.assertEqual(exec_success, True, - "Script result is %s matching with %s" % (result, expected_result)) + "Script result is %s matching with %s" % (str_result, str_expected_result)) else: self.assertEqual(exec_success, True, - "Script result is %s is not matching with %s" % (result, expected_result)) + "Script result is %s is not matching with %s" % (str_result, str_expected_result)) except Exception as e: self.debug('Error=%s' % e)