From 0c28278d9a2f5769b77076b4e1ecaa730420cb55 Mon Sep 17 00:00:00 2001 From: Kan Fu Date: Tue, 23 Jul 2024 13:24:00 -0700 Subject: [PATCH] test: fix regression by DMAS change --- doc/source/Code_Examples/Discover_Locations.md | 6 +++--- src/onc/onc.py | 8 ++++---- tests/regression/doctest.py | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/Code_Examples/Discover_Locations.md b/doc/source/Code_Examples/Discover_Locations.md index 9594188..8ba6a4c 100644 --- a/doc/source/Code_Examples/Discover_Locations.md +++ b/doc/source/Code_Examples/Discover_Locations.md @@ -87,13 +87,13 @@ onc.getLocations(params) ### Get all locations with instruments that have a specific device category and a specific property -Return all locations with at least one instrument that has the device category "**BPR**" and property code "* -*totalpressure**". +Return all locations with at least one instrument that has the device category "**BPR**" and property code +"**totalpressure**". ```python params = { "deviceCategoryCode": "BPR", - "propertyCode": "pressure", + "propertyCode": "totalpressure", } onc.getLocations(params) ``` diff --git a/src/onc/onc.py b/src/onc/onc.py index 5bb7ce1..542ff82 100644 --- a/src/onc/onc.py +++ b/src/onc/onc.py @@ -732,10 +732,10 @@ def getDataProducts(self, filters: dict | None = None): "dataProductOptions": [ { "allowableRange": { - "lowerBound": "-160", + "lowerBound": "-160.0", "onlyIntegers": False, "unitOfMeasure": None, - "upperBound": "140", + "upperBound": "140.0", }, "allowableValues": ["-1000"], "defaultValue": "-1000", @@ -757,10 +757,10 @@ def getDataProducts(self, filters: dict | None = None): }, { "allowableRange": { - "lowerBound": "-160", + "lowerBound": "-160.0", "onlyIntegers": False, "unitOfMeasure": None, - "upperBound": "140", + "upperBound": "140.0", }, "allowableValues": ["-1000"], "defaultValue": "-1000", diff --git a/tests/regression/doctest.py b/tests/regression/doctest.py index de51a95..65d7c17 100644 --- a/tests/regression/doctest.py +++ b/tests/regression/doctest.py @@ -214,10 +214,10 @@ def test_get_data_products(requester): "dataProductOptions": [ { "allowableRange": { - "lowerBound": "-160", + "lowerBound": "-160.0", "onlyIntegers": False, "unitOfMeasure": None, - "upperBound": "140", + "upperBound": "140.0", }, "allowableValues": ["-1000"], "defaultValue": "-1000", @@ -239,10 +239,10 @@ def test_get_data_products(requester): }, { "allowableRange": { - "lowerBound": "-160", + "lowerBound": "-160.0", "onlyIntegers": False, "unitOfMeasure": None, - "upperBound": "140", + "upperBound": "140.0", }, "allowableValues": ["-1000"], "defaultValue": "-1000",