Repository: cloudstack Updated Branches: refs/heads/master 7390f99af -> c1b4ac500
Fix problem string comparison with unicode Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c1b4ac50 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c1b4ac50 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c1b4ac50 Branch: refs/heads/master Commit: c1b4ac500446438236032681cb0587f903f2f9a8 Parents: 7390f99 Author: Girish Shilamkar <[email protected]> Authored: Thu Mar 27 19:00:27 2014 -0400 Committer: Girish Shilamkar <[email protected]> Committed: Thu Mar 27 19:00:27 2014 -0400 ---------------------------------------------------------------------- test/integration/component/test_egress_fw_rules.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c1b4ac50/test/integration/component/test_egress_fw_rules.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py index e8db260..acba955 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() == unicode(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)
