Add stub for testing Telnet
This commit is contained in:
parent
9f8c1a4f64
commit
fe969111ce
1 changed files with 17 additions and 0 deletions
|
|
@ -11,6 +11,11 @@ except ImportError:
|
||||||
import string
|
import string
|
||||||
from evennia.server.portal import irc
|
from evennia.server.portal import irc
|
||||||
|
|
||||||
|
from twisted.test import proto_helpers
|
||||||
|
from twisted.trial.unittest import TestCase as TwistedTestCase
|
||||||
|
|
||||||
|
from .telnet import TelnetServerFactory
|
||||||
|
|
||||||
|
|
||||||
class TestIRC(TestCase):
|
class TestIRC(TestCase):
|
||||||
|
|
||||||
|
|
@ -73,3 +78,15 @@ class TestIRC(TestCase):
|
||||||
s = r'|wthis|Xis|gis|Ma|C|complex|*string'
|
s = r'|wthis|Xis|gis|Ma|C|complex|*string'
|
||||||
|
|
||||||
self.assertEqual(irc.parse_irc_to_ansi(irc.parse_ansi_to_irc(s)), s)
|
self.assertEqual(irc.parse_irc_to_ansi(irc.parse_ansi_to_irc(s)), s)
|
||||||
|
|
||||||
|
|
||||||
|
class TestTelnet(TwistedTestCase):
|
||||||
|
def setUp(self):
|
||||||
|
super(TestTelnet, self).setUp()
|
||||||
|
factory = TelnetServerFactory()
|
||||||
|
self.proto = factory.buildProtocol(("localhost", 0))
|
||||||
|
self.transport = proto_helpers.StringTransport()
|
||||||
|
|
||||||
|
def test_connect(self):
|
||||||
|
self.proto.makeConnection(self.transport)
|
||||||
|
# TODO: Add rest of stuff for testing connection
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue