Skip to content

Commit

Permalink
test/ fix: properly await newly async function
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasNeugebauer committed Mar 4, 2025
1 parent 7c288a2 commit 4b27b04
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
['uncertain', 'unexpected_observations_count']),
(ImageMetadata(box_detections=[h_conf_box_det], point_detections=[l_conf_point_det]),
['uncertain'])])
def test_unexpected_observations_count(detections: ImageMetadata, reason: List[str]):
@pytest.mark.asyncio
async def test_unexpected_observations_count(detections: ImageMetadata, reason: List[str]):
os.environ['LOOP_ORGANIZATION'] = 'zauberzeug'
os.environ['LOOP_PROJECT'] = 'demo'
outbox = Outbox()

r_filter = RelevanceFilter(outbox)
assert r_filter.may_upload_detections(detections, raw_image=b'', cam_id='0:0:0:0', tags=[]) == reason
relevance_filter = RelevanceFilter(outbox)
assert await relevance_filter.may_upload_detections(detections, raw_image=b'', cam_id='0:0:0:0', tags=[]) == reason

0 comments on commit 4b27b04

Please sign in to comment.