mirror of https://github.com/apache/cloudstack.git
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:
parent
b655f9be06
commit
d84585fa6e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue