From 57d7b4f0f5e3265c84a919545ba6c82f6ac21963 Mon Sep 17 00:00:00 2001 From: roxanne-o Date: Wed, 20 Aug 2025 21:20:01 +0000 Subject: [PATCH 1/4] fix test --- test/integration/test_groundlight.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index b8aba319..903af3f2 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -877,8 +877,12 @@ def test_delete_detector(gl: Groundlight): gl.delete_detector(detector) # Verify the detector is actually deleted - with pytest.raises(NotFoundError): + with pytest.raises(ApiException) as exc_info: gl.get_detector(detector.id) + err = exc_info.value + assert err.status == HTTPStatus.GONE + payload = json.loads(err.body) + assert det_id in payload.get("message", "") # Create another detector to test deletion by ID string and that an attached image query is deleted name2 = f"Test delete detector 2 {datetime.utcnow()}" @@ -891,8 +895,12 @@ def test_delete_detector(gl: Groundlight): gl.delete_detector(detector2.id) # Verify the second detector is also deleted - with pytest.raises(NotFoundError): + with pytest.raises(ApiException) as exc_info: gl.get_detector(detector2.id) + err = exc_info.value + assert err.status == HTTPStatus.GONE + payload = json.loads(err.body) + assert det_id in payload.get("message", "") # Verify the image query is also deleted with pytest.raises(NotFoundException): From 5a5dd64ed331613eee1aa606071178b6fa227768 Mon Sep 17 00:00:00 2001 From: Auto-format Bot Date: Wed, 20 Aug 2025 21:22:53 +0000 Subject: [PATCH 2/4] Automatically reformatting code --- test/integration/test_groundlight.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 903af3f2..de6add40 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -881,7 +881,7 @@ def test_delete_detector(gl: Groundlight): gl.get_detector(detector.id) err = exc_info.value assert err.status == HTTPStatus.GONE - payload = json.loads(err.body) + payload = json.loads(err.body) assert det_id in payload.get("message", "") # Create another detector to test deletion by ID string and that an attached image query is deleted @@ -899,7 +899,7 @@ def test_delete_detector(gl: Groundlight): gl.get_detector(detector2.id) err = exc_info.value assert err.status == HTTPStatus.GONE - payload = json.loads(err.body) + payload = json.loads(err.body) assert det_id in payload.get("message", "") # Verify the image query is also deleted From 6782f3e1f01c5ee208a8523347134a274e36f401 Mon Sep 17 00:00:00 2001 From: roxanne-o Date: Wed, 20 Aug 2025 21:25:19 +0000 Subject: [PATCH 3/4] add import --- test/integration/test_groundlight.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 903af3f2..b0afce20 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -7,6 +7,7 @@ import time from datetime import datetime from typing import Any, Dict, Optional, Union +from http import HTTPStatus import pytest from groundlight import Groundlight From 3dc5eb69013b8a6aed078098962067b84324b180 Mon Sep 17 00:00:00 2001 From: Auto-format Bot Date: Wed, 20 Aug 2025 21:26:08 +0000 Subject: [PATCH 4/4] Automatically reformatting code --- test/integration/test_groundlight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/test_groundlight.py b/test/integration/test_groundlight.py index 1d9f2e14..f9cce8e1 100644 --- a/test/integration/test_groundlight.py +++ b/test/integration/test_groundlight.py @@ -6,8 +6,8 @@ import string import time from datetime import datetime -from typing import Any, Dict, Optional, Union from http import HTTPStatus +from typing import Any, Dict, Optional, Union import pytest from groundlight import Groundlight