Skip to content

Commit c0fa001

Browse files
committed
fix: remove deprecated transducer groundwater level endpoint and update related tests
1 parent b9bb73e commit c0fa001

4 files changed

Lines changed: 11 additions & 24 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ jobs:
8686
DB_DRIVER: postgres
8787
BASE_URL: http://localhost:8000
8888
run: |
89-
uv run behave tests/features --tags="@backend and @production" --no-capture
89+
# use this when we have consensus on tag nomenclature
90+
# uv run behave tests/features --tags="@backend and @production" --no-capture
91+
#
92+
uv run behave tests/features/transducer-data-response.feature \
93+
tests/features/thing-type-path-parameters.feature \
94+
tests/features/thing-query-parameters.feature
9095

9196
- name: Upload results to Codecov
9297
uses: codecov/codecov-action@v4

api/observation.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ async def get_transducer_groundwater_level_observations(
122122
session: session_dependency,
123123
user: amp_viewer_dependency,
124124
thing_id: int,
125-
# parameter_id: int | None = None,
126125
start_time: datetime | None = None,
127126
end_time: datetime | None = None,
128127
) -> CustomPage[TransducerObservationWithBlockResponse]:
@@ -139,24 +138,6 @@ async def get_transducer_groundwater_level_observations(
139138
)
140139

141140

142-
@router.get(
143-
"/transducer-groundwater-level",
144-
summary="Get transducer groundwater level observations",
145-
)
146-
async def get_transducer_groundwater_level_observations(
147-
request: Request,
148-
session: session_dependency,
149-
user: amp_viewer_dependency,
150-
thing_id: int | None = None,
151-
parameter_id: int | None = None,
152-
start_time: datetime | None = None,
153-
end_time: datetime | None = None,
154-
) -> CustomPage[TransducerObservationWithBlockResponse]:
155-
return get_transducer_observations(
156-
session, thing_id, parameter_id, start_time, end_time
157-
)
158-
159-
160141
@router.get("/groundwater-level", summary="Get groundwater level observations")
161142
async def get_groundwater_level_observations(
162143
request: Request,

tests/features/steps/transducer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ def step_impl(context):
8484
assert isinstance(context.value, (int, float))
8585

8686

87-
@then('the status should be one of "Draft", "Corrected"')
87+
@then('the status should be one of "approved", "not reviewed"')
8888
def step_impl(context):
8989
assert context.status in (
90-
"Draft",
91-
"Corrected",
92-
), f'Unexpected status: {context.status} not in "Draft", "Corrected"'
90+
"approved",
91+
"not reviewed",
92+
), f'Unexpected status: {context.status} not in "approved", "not reviewed"'
9393

9494

9595
# ============= EOF =============================================

tests/test_observation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ def test_patch_water_chemistry_observation_404_wrong_activity_type(
211211
# ============= Get tests =================
212212

213213

214+
@pytest.mark.skip(reason="No longer supported")
214215
def test_get_transducer_observations():
215216
response = client.get("/observation/transducer-groundwater-level")
216217
assert response.status_code == 200

0 commit comments

Comments
 (0)