From a3ad8a103857f41aa736228c083a08953ed3261c Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 13 Feb 2019 19:20:46 -0500 Subject: [PATCH] fix lots of pyflakes3 failures --- irctest/controllers/oragono.py | 1 - irctest/server_tests/test_account_tag.py | 2 -- irctest/server_tests/test_cap.py | 1 - irctest/server_tests/test_connection_registration.py | 3 --- irctest/server_tests/test_echo_message.py | 2 +- irctest/server_tests/test_extended_join.py | 3 +-- irctest/server_tests/test_messages.py | 4 ---- irctest/server_tests/test_metadata.py | 1 - irctest/server_tests/test_monitor.py | 2 +- irctest/server_tests/test_multi_prefix.py | 4 ---- irctest/server_tests/test_sasl.py | 1 - 11 files changed, 3 insertions(+), 21 deletions(-) diff --git a/irctest/controllers/oragono.py b/irctest/controllers/oragono.py index 4b26f03..6b32a3b 100644 --- a/irctest/controllers/oragono.py +++ b/irctest/controllers/oragono.py @@ -1,5 +1,4 @@ import os -import time import subprocess from irctest.basecontrollers import NotImplementedByController diff --git a/irctest/server_tests/test_account_tag.py b/irctest/server_tests/test_account_tag.py index 40e86c4..844672b 100644 --- a/irctest/server_tests/test_account_tag.py +++ b/irctest/server_tests/test_account_tag.py @@ -3,8 +3,6 @@ """ from irctest import cases -from irctest.client_mock import NoMessageException -from irctest.basecontrollers import NotImplementedByController class AccountTagTestCase(cases.BaseServerTestCase, cases.OptionalityHelper): def connectRegisteredClient(self, nick): diff --git a/irctest/server_tests/test_cap.py b/irctest/server_tests/test_cap.py index 0de4e1a..fc5c858 100644 --- a/irctest/server_tests/test_cap.py +++ b/irctest/server_tests/test_cap.py @@ -1,5 +1,4 @@ from irctest import cases -from irctest.irc_utils.message_parser import Message class CapTestCase(cases.BaseServerTestCase): @cases.SpecificationSelector.requiredBySpecification('IRCv3.1') diff --git a/irctest/server_tests/test_connection_registration.py b/irctest/server_tests/test_connection_registration.py index e26b08c..501014d 100644 --- a/irctest/server_tests/test_connection_registration.py +++ b/irctest/server_tests/test_connection_registration.py @@ -4,9 +4,6 @@ Tests section 4.1 of RFC 1459. """ from irctest import cases -from irctest import authentication -from irctest.irc_utils.message_parser import Message -from irctest.basecontrollers import NotImplementedByController from irctest.client_mock import ConnectionClosed class PasswordedConnectionRegistrationTestCase(cases.BaseServerTestCase): diff --git a/irctest/server_tests/test_echo_message.py b/irctest/server_tests/test_echo_message.py index ad2040d..a583a90 100644 --- a/irctest/server_tests/test_echo_message.py +++ b/irctest/server_tests/test_echo_message.py @@ -22,7 +22,7 @@ class EchoMessageTestCase(cases.BaseServerTestCase): # TODO: check also without this self.sendLine(1, 'CAP REQ :echo-message{}'.format( ' server-time' if server_time else '')) - m = self.getRegistrationMessage(1) + self.getRegistrationMessage(1) # TODO: Remove this one the trailing space issue is fixed in Charybdis # and Mammon: #self.assertMessageEqual(m, command='CAP', diff --git a/irctest/server_tests/test_extended_join.py b/irctest/server_tests/test_extended_join.py index 6e3e8fa..8f13d0d 100644 --- a/irctest/server_tests/test_extended_join.py +++ b/irctest/server_tests/test_extended_join.py @@ -3,7 +3,6 @@ """ from irctest import cases -from irctest.irc_utils.message_parser import Message class MetadataTestCase(cases.BaseServerTestCase, cases.OptionalityHelper): def connectRegisteredClient(self, nick): @@ -41,7 +40,7 @@ class MetadataTestCase(cases.BaseServerTestCase, cases.OptionalityHelper): @cases.SpecificationSelector.requiredBySpecification('IRCv3.1') @cases.OptionalityHelper.skipUnlessHasMechanism('PLAIN') - def testNotLoggedIn(self): + def testLoggedIn(self): self.connectClient('foo', capabilities=['extended-join'], skip_if_cap_nak=True) self.joinChannel(1, '#chan') diff --git a/irctest/server_tests/test_messages.py b/irctest/server_tests/test_messages.py index 90bec42..6ec232d 100644 --- a/irctest/server_tests/test_messages.py +++ b/irctest/server_tests/test_messages.py @@ -4,10 +4,6 @@ Section 3.2 of RFC 2812 """ from irctest import cases -from irctest import client_mock -from irctest import runner -from irctest.irc_utils import ambiguities -from irctest.irc_utils.message_parser import Message class PrivmsgTestCase(cases.BaseServerTestCase): @cases.SpecificationSelector.requiredBySpecification('RFC1459', 'RFC2812') diff --git a/irctest/server_tests/test_metadata.py b/irctest/server_tests/test_metadata.py index 76a3026..776119b 100644 --- a/irctest/server_tests/test_metadata.py +++ b/irctest/server_tests/test_metadata.py @@ -4,7 +4,6 @@ Tests METADATA features. """ from irctest import cases -from irctest.irc_utils.message_parser import Message class MetadataTestCase(cases.BaseServerTestCase): valid_metadata_keys = {'valid_key1', 'valid_key2'} diff --git a/irctest/server_tests/test_monitor.py b/irctest/server_tests/test_monitor.py index 819c92e..eb9315a 100644 --- a/irctest/server_tests/test_monitor.py +++ b/irctest/server_tests/test_monitor.py @@ -88,7 +88,7 @@ class EchoMessageTestCase(cases.BaseServerTestCase): self.assertMonoffline(1, 'bar') @cases.SpecificationSelector.requiredBySpecification('IRCv3.2') - def testMonitorOneConnection(self): + def testMonitorOneConnectionWithQuit(self): self.connectClient('foo') self.check_server_support() self.connectClient('bar') diff --git a/irctest/server_tests/test_multi_prefix.py b/irctest/server_tests/test_multi_prefix.py index 8b691f4..ef9a1f2 100644 --- a/irctest/server_tests/test_multi_prefix.py +++ b/irctest/server_tests/test_multi_prefix.py @@ -4,10 +4,6 @@ Tests multi-prefix. """ from irctest import cases -from irctest import client_mock -from irctest import runner -from irctest.irc_utils import ambiguities -from irctest.irc_utils.message_parser import Message class MultiPrefixTestCase(cases.BaseServerTestCase): @cases.SpecificationSelector.requiredBySpecification('IRCv3.1') diff --git a/irctest/server_tests/test_sasl.py b/irctest/server_tests/test_sasl.py index c5047e8..a1ac3dc 100644 --- a/irctest/server_tests/test_sasl.py +++ b/irctest/server_tests/test_sasl.py @@ -1,7 +1,6 @@ import base64 from irctest import cases -from irctest.irc_utils.message_parser import Message class RegistrationTestCase(cases.BaseServerTestCase): def testRegistration(self):