From d84585fa6ea23a33392a85b3fa7532308c722d1e Mon Sep 17 00:00:00 2001 From: "Boris Stoyanov - a.k.a Bobby" Date: Thu, 14 Sep 2017 15:22:09 +0300 Subject: [PATCH] CLOUDSTACK-10068: Fixing test_iso.py assertions are equating srt and bool instead of the same types (#2261) It appears that asserts.equal(boolean.True, str.True) which seems to be causing the issue. Probably related to some api changes in recent PRs. Will fix the equation to str.lower() so it'll pass. Strangely when running the tests from Pycharm CE they pass, it seems the IDE resolves the type issue during comparison. But when running from command line it failes... After fixing this results came back as expected: --- test/integration/smoke/test_iso.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration/smoke/test_iso.py b/test/integration/smoke/test_iso.py index 9bad575b8d0..f55f8182108 100755 --- a/test/integration/smoke/test_iso.py +++ b/test/integration/smoke/test_iso.py @@ -320,8 +320,8 @@ class TestISO(cloudstackTestCase): "Check display text of updated ISO" ) self.assertEqual( - iso_response.bootable, - self.services["bootable"], + str(iso_response.bootable).lower(), + str(self.services["bootable"]).lower(), "Check if image is bootable of updated ISO" ) @@ -473,14 +473,14 @@ class TestISO(cloudstackTestCase): "Check ISO ID" ) self.assertEqual( - iso_response.ispublic, - self.services["ispublic"], + str(iso_response.ispublic).lower(), + str(self.services["ispublic"]).lower(), "Check ispublic permission of ISO" ) self.assertEqual( - iso_response.isfeatured, - self.services["isfeatured"], + str(iso_response.isfeatured).lower(), + str(self.services["isfeatured"]).lower(), "Check isfeatured permission of ISO" ) return