irctest/irctest/server_tests/readq.py

24 lines
803 B
Python
Raw Permalink Normal View History

"""
`Ergo <https://ergo.chat/>`_-specific tests of responses to DoS attacks
using long lines.
"""
2020-11-30 18:18:02 +00:00
from irctest import cases
class ReadqTestCase(cases.BaseServerTestCase):
2021-05-27 03:55:21 +00:00
@cases.mark_specifications("Ergo")
@cases.mark_capabilities("message-tags")
2020-11-30 18:18:02 +00:00
def testReadqTags(self):
2021-02-22 18:04:23 +00:00
self.connectClient("mallory", name="mallory", capabilities=["message-tags"])
self.joinChannel("mallory", "#test")
self.sendLine("mallory", "PRIVMSG #test " + "a" * 16384)
self.assertDisconnected("mallory")
2020-11-30 18:18:02 +00:00
2021-05-27 03:55:21 +00:00
@cases.mark_specifications("Ergo")
2020-11-30 18:18:02 +00:00
def testReadqNoTags(self):
2021-02-22 18:04:23 +00:00
self.connectClient("mallory", name="mallory")
self.joinChannel("mallory", "#test")
self.sendLine("mallory", "PRIVMSG #test " + "a" * 16384)
self.assertDisconnected("mallory")