From f7f0cdfe0e96e8b3d85d9b5fe21aef8e2ce1fd33 Mon Sep 17 00:00:00 2001 From: Oleksandr Lazarenko Date: Tue, 23 Jun 2026 09:35:07 +0200 Subject: [PATCH] FIX: UTM query parameters --- fiftyone_devicedetection_cloud/tests/test_cloud.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fiftyone_devicedetection_cloud/tests/test_cloud.py b/fiftyone_devicedetection_cloud/tests/test_cloud.py index f16dcbe88..b2c63dce4 100644 --- a/fiftyone_devicedetection_cloud/tests/test_cloud.py +++ b/fiftyone_devicedetection_cloud/tests/test_cloud.py @@ -22,6 +22,7 @@ import unittest import os +import re import time from fiftyone_devicedetection_cloud.devicedetection_cloud_pipelinebuilder import DeviceDetectionCloudPipelineBuilder @@ -103,6 +104,9 @@ def test_missing_property_service_element_not_found(self): except Exception as e: result = str(e) + # The explainer URL may carry UTM query parameters; ignore them. + result = re.sub(r'\?utm_[^\s]*', '', result) + self.assertEqual( result, "Your resource key does not include access to any properties under notpresent. For more details on resource keys, see our explainer: https://51degrees.com/documentation/_info__resource_keys.html Available element data keys are: ['device']") @@ -157,6 +161,9 @@ def test_missing_property_service_not_found_anywhere(self): self.maxDiff = None + # The explainer URL may carry UTM query parameters; ignore them. + result = re.sub(r'\?utm_[^\s]*', '', result) + self.assertEqual( result, "Property notpresent not found in data for element device. This is because your resource key does not include access to this property. Properties that are included for this key under device are " + ', '.join(list(pipeline.get_element("device").get_properties().keys())) + ". For more details on resource keys, see our explainer: https://51degrees.com/documentation/_info__resource_keys.html")