From 50b253fda81336f5a712f3996c87bc968d4fa51c Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Sat, 4 Sep 2021 21:07:17 +0200 Subject: [PATCH] Fix some mode tests not being collected because of their class name (#112) * Fix some mode tests not being collected because of their class name * testBan: Remove unnecessary dependency on echo-message (fixes support for servers without CAP LS) --- irctest/server_tests/chmodes/ban.py | 8 +++----- irctest/server_tests/chmodes/ergo.py | 4 ++-- irctest/server_tests/chmodes/moderated.py | 2 +- irctest/server_tests/chmodes/mute_extban.py | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/irctest/server_tests/chmodes/ban.py b/irctest/server_tests/chmodes/ban.py index 1d097aa..8a0f956 100644 --- a/irctest/server_tests/chmodes/ban.py +++ b/irctest/server_tests/chmodes/ban.py @@ -2,7 +2,7 @@ from irctest import cases from irctest.numerics import ERR_BANNEDFROMCHAN -class BanMode(cases.BaseServerTestCase): +class BanModeTestCase(cases.BaseServerTestCase): @cases.mark_specifications("RFC1459", "RFC2812") def testBan(self): """Basic ban operation""" @@ -12,9 +12,7 @@ class BanMode(cases.BaseServerTestCase): self.sendLine("chanop", "MODE #chan +b bar!*@*") self.assertMessageMatch(self.getMessage("chanop"), command="MODE") - self.connectClient( - "Bar", name="bar", capabilities=["echo-message"], skip_if_cap_nak=True - ) + self.connectClient("Bar", name="bar") self.getMessages("bar") self.sendLine("bar", "JOIN #chan") self.assertMessageMatch(self.getMessage("bar"), command=ERR_BANNEDFROMCHAN) @@ -35,7 +33,7 @@ class BanMode(cases.BaseServerTestCase): self.sendLine("chanop", "MODE #chan +b BAR!*@*") self.assertMessageMatch(self.getMessage("chanop"), command="MODE") - self.connectClient("Bar", name="bar", capabilities=["echo-message"]) + self.connectClient("Bar", name="bar") self.getMessages("bar") self.sendLine("bar", "JOIN #chan") self.assertMessageMatch(self.getMessage("bar"), command=ERR_BANNEDFROMCHAN) diff --git a/irctest/server_tests/chmodes/ergo.py b/irctest/server_tests/chmodes/ergo.py index cf22dc6..eef9d11 100644 --- a/irctest/server_tests/chmodes/ergo.py +++ b/irctest/server_tests/chmodes/ergo.py @@ -12,7 +12,7 @@ MODERN_CAPS = [ @cases.mark_services -class RegisteredOnlySpeakMode(cases.BaseServerTestCase): +class RegisteredOnlySpeakModeTestCase(cases.BaseServerTestCase): @cases.mark_specifications("Ergo") def testRegisteredOnlySpeakMode(self): self.controller.registerUser(self, "evan", "sesame") @@ -68,7 +68,7 @@ class RegisteredOnlySpeakMode(cases.BaseServerTestCase): ) -class OpModerated(cases.BaseServerTestCase): +class OpModeratedTestCase(cases.BaseServerTestCase): @cases.mark_specifications("Ergo") def testOpModerated(self): # test the +U channel mode diff --git a/irctest/server_tests/chmodes/moderated.py b/irctest/server_tests/chmodes/moderated.py index bd2e2f9..e403dfe 100644 --- a/irctest/server_tests/chmodes/moderated.py +++ b/irctest/server_tests/chmodes/moderated.py @@ -2,7 +2,7 @@ from irctest import cases from irctest.numerics import ERR_CANNOTSENDTOCHAN -class ModeratedMode(cases.BaseServerTestCase): +class ModeratedModeTestCase(cases.BaseServerTestCase): @cases.mark_specifications("RFC2812") def testModeratedMode(self): # test the +m channel mode diff --git a/irctest/server_tests/chmodes/mute_extban.py b/irctest/server_tests/chmodes/mute_extban.py index 30fc6af..f22218e 100644 --- a/irctest/server_tests/chmodes/mute_extban.py +++ b/irctest/server_tests/chmodes/mute_extban.py @@ -3,7 +3,7 @@ from irctest.numerics import ERR_CANNOTSENDTOCHAN, ERR_CHANOPRIVSNEEDED from irctest.patma import ANYLIST, StrRe -class MuteExtban(cases.BaseServerTestCase): +class MuteExtbanTestCase(cases.BaseServerTestCase): """https://defs.ircdocs.horse/defs/isupport.html#extban It magically guesses what char the IRCd uses for mutes."""