summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorMatt Behrens <matt@zigg.com>2012-01-18 13:32:28 -0500
committerJoel Rosdahl <joel@rosdahl.net>2012-07-01 18:36:48 +0200
commit5f64e56973deddd5f80ae0bf78cec2932fbb7b9a (patch)
tree88cc843627da66566ea04d8f9b5f773927a49b8e /test.py
parent76ca97f33105ce5be47a405d52d70c485ce38473 (diff)
downloadminiircd-5f64e56973deddd5f80ae0bf78cec2932fbb7b9a.tar.gz
miniircd-5f64e56973deddd5f80ae0bf78cec2932fbb7b9a.zip
ISON support
- ISON support, allows miniircd to be used with e.g. Pidgin's buddy list and tell when people sign on or off - add ISON to test suite - little patch to test.py so that it doesn't break if socket.getfqdn() returns something other than localhost
Diffstat (limited to 'test.py')
-rw-r--r--test.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test.py b/test.py
index 463c63f..7b008fe 100644
--- a/test.py
+++ b/test.py
@@ -77,7 +77,7 @@ class ServerFixture(object):
signal.alarm(1) # Give the server 1 second to respond
line = self.connections[nick].readline().rstrip()
signal.alarm(0) # Cancel the alarm
- regexp = "^%s$" % regexp
+ regexp = ("^%s$" % regexp).replace(r"local\S+", socket.getfqdn())
m = re.match(regexp, line)
if m:
return m
@@ -241,6 +241,15 @@ class TestBasicStuff(ServerFixture):
self.expect("lemur", r":lemur!lemur@127.0.0.1 PART #fisk :boa")
self.expect("apa", r":lemur!lemur@127.0.0.1 PART #fisk :boa")
+ def test_ison(self):
+ self.connect("apa")
+ self.send("apa", "ISON apa lemur")
+ self.expect("apa", r":local\S+ 303 apa :apa")
+
+ self.connect("lemur")
+ self.send("apa", "ISON apa lemur")
+ self.expect("apa", r":local\S+ 303 apa :apa lemur")
+
class TestTwoChannelsStuff(TwoClientsTwoChannelsFixture):
def test_privmsg_to_channel(self):