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:
This commit is contained in:
Boris Stoyanov - a.k.a Bobby 2017-09-14 15:22:09 +03:00 committed by Rohit Yadav
parent b655f9be06
commit d84585fa6e
1 changed files with 6 additions and 6 deletions

View File

@ -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