mirror of
https://github.com/progval/irctest.git
synced 2025-04-05 06:49:47 +00:00
fix some tests not being discovered due to their class names
Follow up from #112
This commit is contained in:
committed by
Val Lorentz
parent
f86e11a288
commit
33f0702c26
@ -5,7 +5,7 @@ from irctest.patma import ANYSTR, StrRe
|
|||||||
|
|
||||||
|
|
||||||
@cases.mark_services
|
@cases.mark_services
|
||||||
class Bouncer(cases.BaseServerTestCase):
|
class BouncerTestCase(cases.BaseServerTestCase):
|
||||||
@cases.mark_specifications("Ergo")
|
@cases.mark_specifications("Ergo")
|
||||||
def testBouncer(self):
|
def testBouncer(self):
|
||||||
"""Test basic bouncer functionality."""
|
"""Test basic bouncer functionality."""
|
||||||
|
@ -3,7 +3,7 @@ import pytest
|
|||||||
from irctest import cases, client_mock, runner
|
from irctest import cases, client_mock, runner
|
||||||
|
|
||||||
|
|
||||||
class TestChannelCaseSensitivity(cases.BaseServerTestCase):
|
class ChannelCaseSensitivityTestCase(cases.BaseServerTestCase):
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"casemapping,name1,name2",
|
"casemapping,name1,name2",
|
||||||
[
|
[
|
||||||
|
@ -11,7 +11,7 @@ MODERN_CAPS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class ChannelForwarding(cases.BaseServerTestCase):
|
class ChannelForwardingTestCase(cases.BaseServerTestCase):
|
||||||
"""Test the +f channel forwarding mode."""
|
"""Test the +f channel forwarding mode."""
|
||||||
|
|
||||||
@cases.mark_specifications("Ergo")
|
@cases.mark_specifications("Ergo")
|
||||||
|
@ -12,7 +12,7 @@ MODERN_CAPS = [
|
|||||||
RENAME_CAP = "draft/channel-rename"
|
RENAME_CAP = "draft/channel-rename"
|
||||||
|
|
||||||
|
|
||||||
class ChannelRename(cases.BaseServerTestCase):
|
class ChannelRenameTestCase(cases.BaseServerTestCase):
|
||||||
"""Basic tests for channel-rename."""
|
"""Basic tests for channel-rename."""
|
||||||
|
|
||||||
@cases.mark_specifications("Ergo")
|
@cases.mark_specifications("Ergo")
|
||||||
|
@ -110,7 +110,7 @@ class LusersTestCase(cases.BaseServerTestCase):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
class BasicLusersTest(LusersTestCase):
|
class BasicLusersTestCase(LusersTestCase):
|
||||||
@cases.mark_specifications("RFC2812")
|
@cases.mark_specifications("RFC2812")
|
||||||
def testLusers(self):
|
def testLusers(self):
|
||||||
self.connectClient("bar", name="bar")
|
self.connectClient("bar", name="bar")
|
||||||
@ -175,7 +175,7 @@ class LusersUnregisteredTestCase(LusersTestCase):
|
|||||||
self.assertLusersResult(lusers, unregistered=0, total=2, max_=2)
|
self.assertLusersResult(lusers, unregistered=0, total=2, max_=2)
|
||||||
|
|
||||||
|
|
||||||
class LusersUnregisteredDefaultInvisibleTest(LusersUnregisteredTestCase):
|
class LusersUnregisteredDefaultInvisibleTestCase(LusersUnregisteredTestCase):
|
||||||
"""Same as above but with +i as the default."""
|
"""Same as above but with +i as the default."""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@ -195,7 +195,7 @@ class LusersUnregisteredDefaultInvisibleTest(LusersUnregisteredTestCase):
|
|||||||
self.assertEqual(lusers.GlobalVisible, 0)
|
self.assertEqual(lusers.GlobalVisible, 0)
|
||||||
|
|
||||||
|
|
||||||
class LuserOpersTest(LusersTestCase):
|
class LuserOpersTestCase(LusersTestCase):
|
||||||
@cases.mark_specifications("Ergo")
|
@cases.mark_specifications("Ergo")
|
||||||
def testLuserOpers(self):
|
def testLuserOpers(self):
|
||||||
self.connectClient("bar", name="bar")
|
self.connectClient("bar", name="bar")
|
||||||
@ -204,7 +204,7 @@ class LuserOpersTest(LusersTestCase):
|
|||||||
self.assertIn(lusers.Opers, (0, None))
|
self.assertIn(lusers.Opers, (0, None))
|
||||||
|
|
||||||
# add 1 oper
|
# add 1 oper
|
||||||
self.sendLine("bar", "OPER root frenchfries")
|
self.sendLine("bar", "OPER operuser operpassword")
|
||||||
msgs = self.getMessages("bar")
|
msgs = self.getMessages("bar")
|
||||||
self.assertIn(RPL_YOUREOPER, {msg.command for msg in msgs})
|
self.assertIn(RPL_YOUREOPER, {msg.command for msg in msgs})
|
||||||
lusers = self.getLusers("bar")
|
lusers = self.getLusers("bar")
|
||||||
@ -213,7 +213,7 @@ class LuserOpersTest(LusersTestCase):
|
|||||||
|
|
||||||
# now 2 opers
|
# now 2 opers
|
||||||
self.connectClient("qux", name="qux")
|
self.connectClient("qux", name="qux")
|
||||||
self.sendLine("qux", "OPER root frenchfries")
|
self.sendLine("qux", "OPER operuser operpassword")
|
||||||
self.getMessages("qux")
|
self.getMessages("qux")
|
||||||
lusers = self.getLusers("bar")
|
lusers = self.getLusers("bar")
|
||||||
self.assertLusersResult(lusers, unregistered=0, total=2, max_=2)
|
self.assertLusersResult(lusers, unregistered=0, total=2, max_=2)
|
||||||
@ -235,7 +235,7 @@ class LuserOpersTest(LusersTestCase):
|
|||||||
self.assertEqual(lusers.Opers, 0)
|
self.assertEqual(lusers.Opers, 0)
|
||||||
|
|
||||||
|
|
||||||
class OragonoInvisibleDefaultTest(LusersTestCase):
|
class ErgoInvisibleDefaultTestCase(LusersTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def config() -> cases.TestCaseControllerConfig:
|
def config() -> cases.TestCaseControllerConfig:
|
||||||
return cases.TestCaseControllerConfig(
|
return cases.TestCaseControllerConfig(
|
||||||
|
@ -116,7 +116,7 @@ class LengthLimitTestCase(cases.BaseServerTestCase):
|
|||||||
self.joinChannel("bar", "#test_channel")
|
self.joinChannel("bar", "#test_channel")
|
||||||
|
|
||||||
|
|
||||||
class TestNoCTCPMode(cases.BaseServerTestCase):
|
class NoCTCPModeTestCase(cases.BaseServerTestCase):
|
||||||
@cases.mark_specifications("Ergo")
|
@cases.mark_specifications("Ergo")
|
||||||
def testNoCTCPMode(self):
|
def testNoCTCPMode(self):
|
||||||
self.connectClient("bar", "bar")
|
self.connectClient("bar", "bar")
|
||||||
|
@ -5,7 +5,7 @@ REGISTER_CAP_NAME = "draft/account-registration"
|
|||||||
|
|
||||||
|
|
||||||
@cases.mark_specifications("IRCv3")
|
@cases.mark_specifications("IRCv3")
|
||||||
class TestRegisterBeforeConnect(cases.BaseServerTestCase):
|
class RegisterBeforeConnectTestCase(cases.BaseServerTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def config() -> cases.TestCaseControllerConfig:
|
def config() -> cases.TestCaseControllerConfig:
|
||||||
return cases.TestCaseControllerConfig(
|
return cases.TestCaseControllerConfig(
|
||||||
@ -29,7 +29,7 @@ class TestRegisterBeforeConnect(cases.BaseServerTestCase):
|
|||||||
|
|
||||||
|
|
||||||
@cases.mark_specifications("IRCv3")
|
@cases.mark_specifications("IRCv3")
|
||||||
class TestRegisterBeforeConnectDisallowed(cases.BaseServerTestCase):
|
class RegisterBeforeConnectDisallowedTestCase(cases.BaseServerTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def config() -> cases.TestCaseControllerConfig:
|
def config() -> cases.TestCaseControllerConfig:
|
||||||
return cases.TestCaseControllerConfig(
|
return cases.TestCaseControllerConfig(
|
||||||
@ -56,7 +56,7 @@ class TestRegisterBeforeConnectDisallowed(cases.BaseServerTestCase):
|
|||||||
|
|
||||||
|
|
||||||
@cases.mark_specifications("IRCv3")
|
@cases.mark_specifications("IRCv3")
|
||||||
class TestRegisterEmailVerified(cases.BaseServerTestCase):
|
class RegisterEmailVerifiedTestCase(cases.BaseServerTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def config() -> cases.TestCaseControllerConfig:
|
def config() -> cases.TestCaseControllerConfig:
|
||||||
return cases.TestCaseControllerConfig(
|
return cases.TestCaseControllerConfig(
|
||||||
@ -106,7 +106,7 @@ class TestRegisterEmailVerified(cases.BaseServerTestCase):
|
|||||||
|
|
||||||
|
|
||||||
@cases.mark_specifications("IRCv3", "Ergo")
|
@cases.mark_specifications("IRCv3", "Ergo")
|
||||||
class TestRegisterNoLandGrabs(cases.BaseServerTestCase):
|
class RegisterNoLandGrabsTestCase(cases.BaseServerTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def config() -> cases.TestCaseControllerConfig:
|
def config() -> cases.TestCaseControllerConfig:
|
||||||
return cases.TestCaseControllerConfig(
|
return cases.TestCaseControllerConfig(
|
||||||
|
@ -149,7 +149,7 @@ class TopicTestCase(cases.BaseServerTestCase):
|
|||||||
self.assertNotIn(RPL_NOTOPIC, [m.command for m in messages])
|
self.assertNotIn(RPL_NOTOPIC, [m.command for m in messages])
|
||||||
|
|
||||||
|
|
||||||
class TopicPrivileges(cases.BaseServerTestCase):
|
class TopicPrivilegesTestCase(cases.BaseServerTestCase):
|
||||||
@cases.mark_specifications("RFC2812")
|
@cases.mark_specifications("RFC2812")
|
||||||
def testTopicPrivileges(self):
|
def testTopicPrivileges(self):
|
||||||
# test the +t channel mode, which prevents unprivileged users
|
# test the +t channel mode, which prevents unprivileged users
|
||||||
|
Reference in New Issue
Block a user