mirror of https://github.com/apache/cloudstack.git
Fix problem string comparison with unicode
Conflicts: test/integration/component/test_egress_fw_rules.py
This commit is contained in:
parent
00a4e6ada9
commit
bf76012fba
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue