From cac4428cbd8ad5ba63224f854878d88d6b6676b8 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 10 Jan 2022 17:22:46 -0500 Subject: [PATCH] regression test for ergochat/ergo#1898 (#130) --- irctest/server_tests/ergo/__init__.py | 0 irctest/server_tests/ergo/services.py | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 irctest/server_tests/ergo/__init__.py create mode 100644 irctest/server_tests/ergo/services.py diff --git a/irctest/server_tests/ergo/__init__.py b/irctest/server_tests/ergo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/irctest/server_tests/ergo/services.py b/irctest/server_tests/ergo/services.py new file mode 100644 index 0000000..eb00ab2 --- /dev/null +++ b/irctest/server_tests/ergo/services.py @@ -0,0 +1,25 @@ +from irctest import cases +from irctest.numerics import RPL_YOUREOPER + + +class NickservTestCase(cases.BaseServerTestCase): + @cases.mark_specifications("Ergo") + def test_saregister(self): + self.connectClient("root", name="root") + self.sendLine("root", "OPER operuser operpassword") + self.assertIn(RPL_YOUREOPER, {msg.command for msg in self.getMessages("root")}) + + self.sendLine( + "root", + "PRIVMSG NickServ :SAREGISTER saregister_test saregistertestpassphrase", + ) + self.getMessages("root") + + # test that the account was registered + self.connectClient( + name="saregister_test", + nick="saregister_test", + capabilities=["sasl"], + account="saregister_test", + password="saregistertestpassphrase", + )