Fix invalid assertIsNotNone statement

This is to fix the invalid assertIsNotNone statements like
"self.assertIsNotNone('maxTotalInstances', sot.absolute)",
which will always return True.

Change-Id: If3356acb8241198e028adfc2aecceee7dbadcc1e
This commit is contained in:
zhufl 2020-11-02 17:33:10 +08:00
parent 34aa00bff5
commit 907634cc0a
1 changed files with 5 additions and 5 deletions

View File

@ -17,8 +17,8 @@ class TestLimits(base.BaseFunctionalTest):
def test_limits(self):
sot = self.conn.compute.get_limits()
self.assertIsNotNone('maxTotalInstances', sot.absolute)
self.assertIsNotNone('maxTotalRAMSize', sot.absolute)
self.assertIsNotNone('maxTotalKeypairs', sot.absolute)
self.assertIsNotNone('maxSecurityGroups', sot.absolute)
self.assertIsNotNone('maxSecurityGroupRules', sot.absolute)
self.assertIsNotNone(sot.absolute['instances'])
self.assertIsNotNone(sot.absolute['total_ram'])
self.assertIsNotNone(sot.absolute['keypairs'])
self.assertIsNotNone(sot.absolute['security_groups'])
self.assertIsNotNone(sot.absolute['security_group_rules'])