Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions fiftyone_devicedetection_cloud/tests/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import unittest
import os
import re
import time

from fiftyone_devicedetection_cloud.devicedetection_cloud_pipelinebuilder import DeviceDetectionCloudPipelineBuilder
Expand Down Expand Up @@ -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']")

Expand Down Expand Up @@ -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")

Expand Down
Loading