diff --git a/irctest/server_tests/test_connection_registration.py b/irctest/server_tests/test_connection_registration.py index a719768..e26b08c 100644 --- a/irctest/server_tests/test_connection_registration.py +++ b/irctest/server_tests/test_connection_registration.py @@ -31,6 +31,16 @@ class PasswordedConnectionRegistrationTestCase(cases.BaseServerTestCase): self.assertNotEqual(m.command, '001', msg='Got 001 after NICK+USER but missing PASS') + @cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812') + def testWrongPassword(self): + self.addClient() + self.sendLine(1, 'PASS {}'.format(self.password + "garbage")) + self.sendLine(1, 'NICK foo') + self.sendLine(1, 'USER username * * :Realname') + m = self.getRegistrationMessage(1) + self.assertNotEqual(m.command, '001', + msg='Got 001 after NICK+USER but incorrect PASS') + @cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812') def testPassAfterNickuser(self): """“The password can and must be set before any attempt to register