From f63de0548a5a0ea4209bb7fd963d0c299456a333 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 30 Jul 2021 12:10:49 -0400 Subject: [PATCH] reenable some account-registration tests for Ergo These were incorrectly being skipped. If `CAP LS 302` precedes `requestCapabilities`, `requestCapabilities` sees the LS response instead of the ACK it expects. Then it assumes that the request was NAK'ed and skips the test. --- irctest/server_tests/test_register_verify.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irctest/server_tests/test_register_verify.py b/irctest/server_tests/test_register_verify.py index 160eb54..f094f5b 100644 --- a/irctest/server_tests/test_register_verify.py +++ b/irctest/server_tests/test_register_verify.py @@ -15,8 +15,8 @@ class TestRegisterBeforeConnect(cases.BaseServerTestCase): def testBeforeConnect(self): self.addClient("bar") - self.sendLine("bar", "CAP LS 302") self.requestCapabilities("bar", [REGISTER_CAP_NAME], skip_if_cap_nak=True) + self.sendLine("bar", "CAP LS 302") caps = self.getCapLs("bar") self.assertIn(REGISTER_CAP_NAME, caps) self.assertIn("before-connect", caps[REGISTER_CAP_NAME]) @@ -38,8 +38,8 @@ class TestRegisterBeforeConnectDisallowed(cases.BaseServerTestCase): def testBeforeConnect(self): self.addClient("bar") - self.sendLine("bar", "CAP LS 302") self.requestCapabilities("bar", [REGISTER_CAP_NAME], skip_if_cap_nak=True) + self.sendLine("bar", "CAP LS 302") caps = self.getCapLs("bar") self.assertIn(REGISTER_CAP_NAME, caps) self.assertEqual(caps[REGISTER_CAP_NAME], None) @@ -72,10 +72,10 @@ class TestRegisterEmailVerified(cases.BaseServerTestCase): def testBeforeConnect(self): self.addClient("bar") - self.sendLine("bar", "CAP LS 302") self.requestCapabilities( "bar", capabilities=[REGISTER_CAP_NAME], skip_if_cap_nak=True ) + self.sendLine("bar", "CAP LS 302") caps = self.getCapLs("bar") self.assertIn(REGISTER_CAP_NAME, caps) self.assertEqual(