88
99import json
1010import os
11- import shutil
12- from datetime import datetime , timezone
13- from pathlib import Path
11+ from datetime import datetime
1412from types import SimpleNamespace
1513
1614import pytest
@@ -251,7 +249,7 @@ def test_unknown_trust_defaults_to_0_3(self, tmp_path):
251249class TestEchoPrevention :
252250 def test_poll_ignores_own_source_events (self , tmp_path ):
253251 """poll_clawvault_events should skip events from the bridge's own source."""
254- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
252+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
255253
256254 bridge = FCMBridge (source = "imi" )
257255
@@ -274,7 +272,7 @@ def test_poll_ignores_own_source_events(self, tmp_path):
274272
275273 def test_poll_accepts_clawvault_source (self , tmp_path ):
276274 """poll_clawvault_events should accept events from source=clawvault."""
277- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
275+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
278276
279277 bridge = FCMBridge (source = "imi" )
280278
@@ -297,7 +295,7 @@ def test_poll_accepts_clawvault_source(self, tmp_path):
297295
298296 def test_poll_rejects_non_clawvault_non_self (self , tmp_path ):
299297 """poll_clawvault_events only accepts source=clawvault."""
300- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
298+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
301299
302300 bridge = FCMBridge (source = "imi" )
303301
@@ -323,7 +321,7 @@ def test_poll_rejects_non_clawvault_non_self(self, tmp_path):
323321
324322class TestLoopPrevention :
325323 def test_poll_skips_events_with_federated_tag (self , tmp_path ):
326- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
324+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
327325
328326 bridge = FCMBridge (source = "imi" )
329327
@@ -344,7 +342,7 @@ def test_poll_skips_events_with_federated_tag(self, tmp_path):
344342 assert len (events ) == 0
345343
346344 def test_poll_skips_events_with_from_imi_tag (self , tmp_path ):
347- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
345+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
348346
349347 bridge = FCMBridge (source = "imi" )
350348
@@ -365,7 +363,7 @@ def test_poll_skips_events_with_from_imi_tag(self, tmp_path):
365363 assert len (events ) == 0
366364
367365 def test_poll_skips_from_clawvault_tag (self , tmp_path ):
368- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
366+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
369367
370368 bridge = FCMBridge (source = "imi" )
371369
@@ -386,7 +384,7 @@ def test_poll_skips_from_clawvault_tag(self, tmp_path):
386384 assert len (events ) == 0
387385
388386 def test_poll_skips_from_external_tag (self , tmp_path ):
389- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
387+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
390388
391389 bridge = FCMBridge (source = "imi" )
392390
@@ -412,7 +410,7 @@ def test_poll_skips_from_external_tag(self, tmp_path):
412410
413411class TestMarkConsumed :
414412 def test_moves_file_to_processed (self , tmp_path ):
415- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR , FCM_PROCESSED_DIR
413+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCM_PROCESSED_DIR , FCMBridge
416414
417415 bridge = FCMBridge (source = "imi" )
418416
@@ -429,7 +427,7 @@ def test_moves_file_to_processed(self, tmp_path):
429427 assert (FCM_PROCESSED_DIR / "consume_test.json" ).exists ()
430428
431429 def test_tracks_consumed_id (self , tmp_path ):
432- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
430+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
433431
434432 bridge = FCMBridge (source = "imi" )
435433
@@ -445,7 +443,7 @@ def test_tracks_consumed_id(self, tmp_path):
445443 assert "consume-test-2" in bridge ._consumed_ids
446444
447445 def test_consumed_events_skipped_in_poll (self , tmp_path ):
448- from imi .integrations .fcm_bridge import FCMBridge , FCM_EVENTS_DIR
446+ from imi .integrations .fcm_bridge import FCM_EVENTS_DIR , FCMBridge
449447
450448 bridge = FCMBridge (source = "imi" )
451449
0 commit comments