Use assert_flavor_equal to check flavor before and after microversion 2.46
Flavor id is not returned in the server response after microversion 2.46,
but we can use base.assert_flavor_equal to check flavor before and after
microversion 2.46.
Change-Id: If04005a3ff5ef4b1faa4d2179ba2987abdd5ef04
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index f6c3e73..d47ff51 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -417,10 +417,7 @@
waiters.wait_for_server_status(self.client, self.server_id, 'ACTIVE')
# Make sure everything still looks OK.
server = self.client.show_server(self.server_id)['server']
- # The flavor id is not returned in the server response after
- # microversion 2.46 so handle that gracefully.
- if server['flavor'].get('id'):
- self.assertEqual(self.flavor_ref, server['flavor']['id'])
+ self.assert_flavor_equal(self.flavor_ref, server['flavor'])
attached_volumes = server['os-extended-volumes:volumes_attached']
self.assertEqual(1, len(attached_volumes))
self.assertEqual(volume['id'], attached_volumes[0]['id'])