evennia.server.portal.test_wire_formats¶
Tests for WebSocket wire formats and subprotocol negotiation.
- Tests cover:
gmcp_utils.py: encode_gmcp / decode_gmcp
Wire format codecs: EvenniaV1, Terminal, JsonStandard, GmcpStandard
WebSocket subprotocol negotiation in webclient.py
- class evennia.server.portal.test_wire_formats.TestGmcpEncode(methodName='runTest')[source]¶
Bases:
TestCaseTests for gmcp_utils.encode_gmcp().
- class evennia.server.portal.test_wire_formats.TestGmcpDecode(methodName='runTest')[source]¶
Bases:
TestCaseTests for gmcp_utils.decode_gmcp().
- class evennia.server.portal.test_wire_formats.TestWireFormatBase(methodName='runTest')[source]¶
Bases:
TestCaseTests for the WireFormat abstract base class.
- class evennia.server.portal.test_wire_formats.TestEvenniaV1Format(methodName='runTest')[source]¶
Bases:
TestCaseTests for the v1.evennia.com wire format.
- class evennia.server.portal.test_wire_formats.TestTerminalFormat(methodName='runTest')[source]¶
Bases:
TestCaseTests for the terminal.mudstandards.org wire format.
- class evennia.server.portal.test_wire_formats.TestJsonStandardFormat(methodName='runTest')[source]¶
Bases:
TestCaseTests for the json.mudstandards.org wire format.
- class evennia.server.portal.test_wire_formats.TestGmcpStandardFormat(methodName='runTest')[source]¶
Bases:
TestCaseTests for the gmcp.mudstandards.org wire format.
- class evennia.server.portal.test_wire_formats.TestWireFormatRegistry(methodName='runTest')[source]¶
Bases:
TestCaseTests for the wire_formats package registry.
- class evennia.server.portal.test_wire_formats.TestWebSocketSubprotocolNegotiation(methodName='runTest')[source]¶
Bases:
TestCaseTests for the onConnect() subprotocol negotiation in WebSocketClient.
These test the negotiation logic in isolation without starting a full Twisted reactor, by directly calling onConnect() with mock request objects.
- class evennia.server.portal.test_wire_formats.TestEvenniaV1RoundTrip(methodName='runTest')[source]¶
Bases:
TestCaseTest encode → decode round-trip for v1.evennia.com.
- class evennia.server.portal.test_wire_formats.TestGmcpRoundTrip(methodName='runTest')[source]¶
Bases:
TestCaseTest encode → decode round-trip for gmcp.mudstandards.org.
- class evennia.server.portal.test_wire_formats.TestJsonStandardRoundTrip(methodName='runTest')[source]¶
Bases:
TestCaseTest encode → decode round-trip for json.mudstandards.org.
- class evennia.server.portal.test_wire_formats.TestTerminalEdgeCases(methodName='runTest')[source]¶
Bases:
TestCaseEdge-case tests for TerminalFormat.
- class evennia.server.portal.test_wire_formats.TestJsonStandardEdgeCases(methodName='runTest')[source]¶
Bases:
TestCaseEdge-case tests for JsonStandardFormat.
- test_decode_envelope_missing_proto()[source]¶
JSON envelope with missing proto should use empty string default.
- test_decode_envelope_missing_all_fields()[source]¶
JSON envelope with no recognized fields returns None (empty funcname).
- class evennia.server.portal.test_wire_formats.TestGmcpStandardEdgeCases(methodName='runTest')[source]¶
Bases:
TestCaseEdge-case tests for GmcpStandardFormat.
- class evennia.server.portal.test_wire_formats.TestBaseWireFormatHelpers(methodName='runTest')[source]¶
Bases:
TestCaseTests for the shared helper methods on WireFormat base class.
- test_extract_text_and_flags_raw_option()[source]¶
Raw option should be extracted into the result tuple.
- test_extract_text_and_flags_raw_protocol_flag()[source]¶
RAW protocol flag should be used when option is absent.