diff --git a/tempest/api/volume/admin/test_backends_capabilities.py b/tempest/api/volume/admin/test_backends_capabilities.py
index 9a85ed4..e3a8156 100644
--- a/tempest/api/volume/admin/test_backends_capabilities.py
+++ b/tempest/api/volume/admin/test_backends_capabilities.py
@@ -37,6 +37,33 @@
         # Check response schema
         self.admin_capabilities_client.show_backend_capabilities(self.hosts[0])
 
+    @staticmethod
+    def _change_capabilities_storage_protocol(capabilities):
+        """Convert storage_protocol to its canonical version"""
+        # List of storage protocols variants defined in cinder.common.constants
+        # The canonical name for storage protocol comes first in the list
+        VARIANTS = [['iSCSI', 'iscsi'], ['FC', 'fibre_channel', 'fc'],
+                    ['NFS', 'nfs'], ['NVMe-oF', 'NVMeOF', 'nvmeof']]
+
+        capabilities = sorted(list(capabilities))
+
+        # Cinder Bug #1966103: Some drivers were reporting different strings
+        # to represent the same storage protocol. For backward compatibility,
+        # the scheduler can handle the variants, but to standardize this for
+        # operators (who may need to refer to the protocol in volume-type
+        # extra-specs), the get-pools and get-capabilities response was changed
+        # to only report the canonical name for a storage protocol, but these
+        # 2 REST API call swere not changed simultaneously, so we may or may
+        # not get canonical names, so just convert canonical names.
+        for item in range(len(capabilities)):
+            for variants in VARIANTS:
+                if capabilities[item][2] in variants:
+                    capabilities[item] = (capabilities[item][0],
+                                          capabilities[item][1],
+                                          variants[0])
+
+        return capabilities
+
     @decorators.idempotent_id('a9035743-d46a-47c5-9cb7-3c80ea16dea0')
     def test_compare_volume_stats_values(self):
         """Test comparing volume stats values
@@ -47,11 +74,6 @@
                         'volume_backend_name',
                         'storage_protocol')
 
-        # List of storage protocols variants defined in cinder.common.constants
-        # The canonical name for storage protocol comes first in the list
-        VARIANTS = [['iSCSI', 'iscsi'], ['FC', 'fibre_channel', 'fc'],
-                    ['NFS', 'nfs'], ['NVMe-oF', 'NVMeOF', 'nvmeof']]
-
         # Get list backend capabilities using show_pools
         cinder_pools = [
             pool['capabilities'] for pool in
@@ -65,27 +87,9 @@
         ]
 
         # Returns a tuple of VOLUME_STATS values
-        expected_list = sorted(list(map(operator.itemgetter(*VOLUME_STATS),
-                                        cinder_pools)))
-        observed_list = sorted(list(map(operator.itemgetter(*VOLUME_STATS),
-                                        capabilities)))
-
-        # Cinder Bug #1966103: Some drivers were reporting different strings
-        # to represent the same storage protocol. For backward compatibility,
-        # the scheduler can handle the variants, but to standardize this for
-        # operators (who may need to refer to the protocol in volume-type
-        # extra-specs), the get-pools response was changed by I07d74078dbb1
-        # to only report the canonical name for a storage protocol. Thus, the
-        # expected_list (which we got from the get-pools call) will only
-        # contain canonical names, while the observed_list (which we got
-        # from the driver capabilities call) may contain a variant. So before
-        # comparing the lists, we need to look for known variants in the
-        # observed_list elements and replace them with their canonical values
-        for item in range(len(observed_list)):
-            for variants in VARIANTS:
-                if observed_list[item][2] in variants:
-                    observed_list[item] = (observed_list[item][0],
-                                           observed_list[item][1],
-                                           variants[0])
+        expected_list = self._change_capabilities_storage_protocol(
+            map(operator.itemgetter(*VOLUME_STATS), cinder_pools))
+        observed_list = self._change_capabilities_storage_protocol(
+            map(operator.itemgetter(*VOLUME_STATS), capabilities))
 
         self.assertEqual(expected_list, observed_list)
