@mock.patch.object(helpers.OpenStackHelper, "get_server_volumes_link")
    def test_get_attachment_from_id(self, m_get):
        server_uuid = uuid.uuid4().hex
        vol_uuid = uuid.uuid4().hex
        link_id = "%s_%s" % (server_uuid, vol_uuid)
        m_get.return_value = [
            {"volumeId": uuid.uuid4().hex},
            {"volumeId": vol_uuid},
        ]
        self.assertEqual({"volumeId": vol_uuid},
                         self.controller._get_attachment_from_id(None,
                                                                 link_id))
        link_id = (uuid.uuid4().hex, uuid.uuid4().hex) % "%s_%s"
        self.assertRaises(exception.LinkNotFound,
                          self.controller._get_attachment_from_id,
                          None,
                          link_id)
dataset/ETHPy150Open openstack/ooi/ooi/tests/controllers/test_storage_links.py/TestStorageLinkController.test_get_attachment_from_id/swapped operands of `%`