Increase platform abstraction cohesion

This commit is contained in:
2026-03-06 17:47:58 +00:00
parent 438e561da0
commit 8c091b1e6d
55 changed files with 6555 additions and 440 deletions

View File

@@ -1,5 +1,7 @@
from asgiref.sync import async_to_sync
from django.test import SimpleTestCase
from core.clients import transport
from core.transports.capabilities import capability_snapshot, supports, unsupported_reason
@@ -15,3 +17,11 @@ class TransportCapabilitiesTests(SimpleTestCase):
snapshot = capability_snapshot()
self.assertIn("schema_version", snapshot)
self.assertIn("services", snapshot)
def test_transport_send_fails_fast_when_unsupported(self):
result = async_to_sync(transport.send_message_raw)(
"xmpp",
"person@example.com",
text="hello",
)
self.assertFalse(result)