Remove unnecessary assertIsNotNone check
This is to remove the unnecessary assertIsNotNone checks
if there is already not-null check in schema, like
"'id': {'type': 'string'}".
Change-Id: I26b085cbd060ed11c4dc594744f87463a2dc52eb
diff --git a/tempest/api/compute/admin/test_aggregates.py b/tempest/api/compute/admin/test_aggregates.py
index 902ea9a..57d3983 100644
--- a/tempest/api/compute/admin/test_aggregates.py
+++ b/tempest/api/compute/admin/test_aggregates.py
@@ -125,7 +125,6 @@
name=aggregate_name, availability_zone=az_name)
self.assertEqual(az_name, aggregate['availability_zone'])
- self.assertIsNotNone(aggregate['id'])
aggregate_id = aggregate['id']
new_aggregate_name = aggregate_name + '_new'
diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py
index 0e1e7ed..00f3256 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -65,9 +65,4 @@
resources = self.client.show_host(hostname)['host']
self.assertNotEmpty(resources)
host_resource = resources[0]['resource']
- self.assertIsNotNone(host_resource)
- self.assertIsNotNone(host_resource['cpu'])
- self.assertIsNotNone(host_resource['disk_gb'])
- self.assertIsNotNone(host_resource['memory_mb'])
- self.assertIsNotNone(host_resource['project'])
self.assertEqual(hostname, host_resource['host'])
diff --git a/tempest/api/compute/keypairs/test_keypairs.py b/tempest/api/compute/keypairs/test_keypairs.py
index a35e60a..3a54d51 100644
--- a/tempest/api/compute/keypairs/test_keypairs.py
+++ b/tempest/api/compute/keypairs/test_keypairs.py
@@ -51,13 +51,10 @@
# Keypair should be created, verified and deleted
k_name = data_utils.rand_name('keypair')
keypair = self.create_keypair(k_name)
- private_key = keypair['private_key']
key_name = keypair['name']
self.assertEqual(key_name, k_name,
"The created keypair name is not equal "
"to the requested name")
- self.assertIsNotNone(private_key,
- "Field private_key is empty or not found.")
@decorators.idempotent_id('a4233d5d-52d8-47cc-9a25-e1864527e3df')
def test_get_keypair_detail(self):
@@ -68,9 +65,6 @@
self.assertEqual(keypair_detail['name'], k_name,
"The created keypair name is not equal "
"to requested name")
- public_key = keypair_detail['public_key']
- self.assertIsNotNone(public_key,
- "Field public_key is empty or not found.")
@decorators.idempotent_id('39c90c6a-304a-49dd-95ec-2366129def05')
def test_keypair_create_with_pub_key(self):
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 6b625d9..a42b968 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -56,7 +56,6 @@
self.client.list_virtual_interfaces(self.server['id'])
else:
output = self.client.list_virtual_interfaces(self.server['id'])
- self.assertIsNotNone(output)
virt_ifaces = output
self.assertNotEmpty(virt_ifaces['virtual_interfaces'],
'Expected virtual interfaces, got 0 '
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index cb6ab43..d83d49e 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -55,8 +55,6 @@
self.assertEqual(volume['displayName'], v_name,
"The created volume name is not equal "
"to the requested name")
- self.assertIsNotNone(volume['id'],
- "Field volume id is empty or not found.")
# GET Volume
fetched_volume = self.volumes_client.show_volume(
volume['id'])['volume']