@@ -71,22 +71,34 @@ def testChannelOperatorModeTargetDoesNotExist(self):
71
71
self .assertLessEqual (commands , {ERR_NOSUCHNICK , ERR_USERNOTINCHANNEL })
72
72
73
73
@cases .mark_specifications ("Modern" )
74
+ @cases .xfailIf (
75
+ lambda self : bool (
76
+ self .controller .software_name == "UnrealIRCd"
77
+ and self .controller .software_version == 5
78
+ ),
79
+ "UnrealIRCd <6.1.7 returns ERR_NOSUCHNICK on non-existent channel" ,
80
+ )
74
81
def testChannelOperatorModeChannelDoesNotExist (self ):
75
- """Test that +o targeting a nonexistent channel fails as expected."""
82
+ """Test that +o targeting a nonexistent channel fails as expected.
83
+
84
+ "If <target> is a channel that does not exist on the network,
85
+ # the ERR_NOSUCHCHANNEL (403) numeric is returned."
86
+ """
76
87
self .setupNicks ()
77
88
# target channel does not exist, but target nick does:
78
89
self .sendLine ("chanop" , "MODE #nonexistentchan +o chanop" )
79
90
messages = self .getMessages ("chanop" )
80
91
self .assertEqual (len (messages ), 1 )
81
- # Modern: "If <target> is a channel that does not exist on the network,
82
- # the ERR_NOSUCHCHANNEL (403) numeric is returned."
83
- # However, Unreal and ngircd send 401 ERR_NOSUCHNICK here instead:
84
- if self .controller .software_name not in ("UnrealIRCd" , "ngIRCd" ):
85
- self .assertEqual (messages [0 ].command , ERR_NOSUCHCHANNEL )
86
- else :
87
- self .assertIn (messages [0 ].command , [ERR_NOSUCHCHANNEL , ERR_NOSUCHNICK ])
92
+ self .assertMessageMatch (messages [0 ], command = ERR_NOSUCHCHANNEL )
88
93
89
94
@cases .mark_specifications ("Modern" )
95
+ @cases .xfailIf (
96
+ lambda self : bool (
97
+ self .controller .software_name == "UnrealIRCd"
98
+ and self .controller .software_version == 5
99
+ ),
100
+ "UnrealIRCd <6.1.7 returns ERR_NOSUCHNICK on non-existent channel" ,
101
+ )
90
102
def testChannelOperatorModeChannelAndTargetDoNotExist (self ):
91
103
"""Test that +o targeting a nonexistent channel and nickname
92
104
fails as expected."""
@@ -97,7 +109,7 @@ def testChannelOperatorModeChannelAndTargetDoNotExist(self):
97
109
self .assertEqual (len (messages ), 1 )
98
110
self .assertIn (
99
111
messages [0 ].command ,
100
- [ERR_NOSUCHCHANNEL , ERR_NOTONCHANNEL , ERR_NOSUCHNICK , ERR_USERNOTINCHANNEL ],
112
+ [ERR_NOSUCHCHANNEL , ERR_NOTONCHANNEL , ERR_USERNOTINCHANNEL ],
101
113
)
102
114
103
115
@cases .mark_specifications ("Modern" )
0 commit comments