Increase platform abstraction cohesion
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user