Skip to content

Commit

Permalink
Add test for failure
Browse files Browse the repository at this point in the history
  • Loading branch information
webb-ben committed Feb 5, 2025
1 parent c1a66ad commit bf1d87e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_sensorthings_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import pytest

from pygeoapi.provider.base import ProviderInvalidDataError
from pygeoapi.provider.sensorthings import SensorThingsProvider


Expand Down Expand Up @@ -197,6 +198,12 @@ def test_custom_uri_field(config):
'https://geoconnex.us/iow/sta-demo/timeseries/9'
assert len(result['properties']) == 2

config['uri_field'] = 'bad_uri'
p = SensorThingsProvider(config)
with pytest.raises(ProviderInvalidDataError,
match=".*Unable to find uri field: bad_uri"):
result = p.get('9')


def test_transactions(config, post_body):
p = SensorThingsProvider(config)
Expand Down

0 comments on commit bf1d87e

Please sign in to comment.