Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/tests/endpoints/test_detections.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def test_build_links_for_group_skips_existing_alert():
@pytest.mark.asyncio
async def test_filter_candidate_keeps_alert_within_threshold(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
nearby = Alert(
organization_id=1,
lat=SMOKE_LOCATION[0] + 0.005,
Expand All @@ -530,7 +530,7 @@ async def test_filter_candidate_keeps_alert_within_threshold(detection_session:
@pytest.mark.asyncio
async def test_filter_candidate_drops_alert_beyond_threshold(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
far = Alert(
organization_id=1,
lat=DISTANT_LOCATION[0],
Expand All @@ -549,7 +549,7 @@ async def test_filter_candidate_drops_alert_beyond_threshold(detection_session:
@pytest.mark.asyncio
async def test_filter_candidate_keeps_alert_with_no_location(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
anchorless = Alert(organization_id=1, lat=None, lon=None, started_at=now, last_seen_at=now)
detection_session.add(anchorless)
await detection_session.commit()
Expand All @@ -562,7 +562,7 @@ async def test_filter_candidate_keeps_alert_with_no_location(detection_session:
@pytest.mark.asyncio
async def test_filter_candidate_returns_unchanged_when_location_missing(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
a = Alert(
organization_id=1,
lat=DISTANT_LOCATION[0],
Expand All @@ -581,7 +581,7 @@ async def test_filter_candidate_returns_unchanged_when_location_missing(detectio
@pytest.mark.asyncio
async def test_get_or_create_alert_id_creates_new_when_existing_too_far(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
distant = Alert(
organization_id=1,
lat=DISTANT_LOCATION[0],
Expand Down Expand Up @@ -609,7 +609,7 @@ async def test_get_or_create_alert_id_creates_new_when_existing_too_far(detectio
@pytest.mark.asyncio
async def test_get_or_create_alert_id_picks_nearby_over_distant(detection_session: AsyncSession):
alert_crud = AlertCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()
distant = Alert(
organization_id=1,
lat=DISTANT_LOCATION[0],
Expand Down Expand Up @@ -1256,7 +1256,7 @@ async def test_attach_sequence_does_not_bridge_to_distant_alert(detection_sessio
seq_crud = SequenceCRUD(detection_session)
alert_crud = AlertCRUD(detection_session)
cam_crud = CameraCRUD(detection_session)
now = datetime.utcnow()
now = utcnow()

cam2 = Camera(
organization_id=1,
Expand Down
Loading