bot tests: Remove unnecessary imports.
This commit is contained in:
parent
031510410b
commit
509991f26f
|
@ -1,10 +1,8 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import MagicMock
|
||||
from zulip_bots.bots.connect_four.connect_four import *
|
||||
from zulip_bots.game_handler import BadMoveException
|
||||
from typing import Dict, Any, List
|
||||
from typing import Dict, List
|
||||
|
||||
|
||||
class TestConnectFourBot(BotTestCase, DefaultTests):
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
from typing import List
|
||||
from unittest.mock import patch
|
||||
|
||||
from zulip_bots.bots.dropbox_share.test_util import (
|
||||
|
|
|
@ -5,8 +5,6 @@ from zulip_bots.test_lib import (
|
|||
get_bot_message_handler,
|
||||
)
|
||||
|
||||
from typing import Any
|
||||
|
||||
|
||||
class TestFollowUpBot(BotTestCase, DefaultTests):
|
||||
bot_name = "followup"
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
from zulip_bots.game_handler import GameInstance
|
||||
|
||||
from contextlib import contextmanager
|
||||
from mock import MagicMock, patch
|
||||
from mock import patch
|
||||
|
||||
from typing import Any, Dict, List
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import MagicMock
|
||||
from zulip_bots.bots.game_of_fifteen.game_of_fifteen import GameOfFifteenModel
|
||||
from zulip_bots.game_handler import BadMoveException
|
||||
from typing import Dict, Any, List, Tuple
|
||||
from typing import Dict, List, Tuple
|
||||
|
||||
|
||||
class TestGameOfFifteenBot(BotTestCase, DefaultTests):
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import patch
|
||||
from requests.exceptions import HTTPError, ConnectionError
|
||||
|
||||
from typing import Any, Union
|
||||
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler
|
||||
|
||||
class TestGiphyBot(BotTestCase, DefaultTests):
|
||||
|
|
|
@ -5,8 +5,6 @@ from zulip_bots.test_lib import (
|
|||
get_bot_message_handler,
|
||||
)
|
||||
|
||||
from typing import Any
|
||||
|
||||
class TestGithubDetailBot(BotTestCase, DefaultTests):
|
||||
bot_name = "github_detail"
|
||||
mock_config = {'owner': 'zulip', 'repo': 'zulip'}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
|
||||
from typing import Any
|
||||
|
||||
class TestHelpBot(BotTestCase, DefaultTests):
|
||||
bot_name = "help"
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@ from unittest.mock import patch
|
|||
|
||||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
|
||||
import requests
|
||||
|
||||
class TestIDoneThisBot(BotTestCase, DefaultTests):
|
||||
bot_name = "idonethis" # type: str
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler, read_bot_fixture_data
|
||||
import simple_salesforce
|
||||
from simple_salesforce.exceptions import SalesforceAuthenticationFailed
|
||||
from contextlib import contextmanager
|
||||
from unittest.mock import patch
|
||||
from typing import Any, Dict
|
||||
import logging
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
|
|
@ -3,8 +3,6 @@ from zulip_bots.test_lib import (
|
|||
DefaultTests,
|
||||
)
|
||||
|
||||
from typing import Any
|
||||
|
||||
class TestSusiBot(BotTestCase, DefaultTests):
|
||||
bot_name = "susi"
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
from zulip_bots.test_lib import BotTestCase, DefaultTests
|
||||
from zulip_bots.game_handler import GameInstance
|
||||
|
||||
from unittest.mock import patch
|
||||
from typing import List, Tuple, Any
|
||||
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@ from zulip_bots.test_file_utils import (
|
|||
)
|
||||
from unittest.mock import patch
|
||||
import tweepy
|
||||
import os
|
||||
import json
|
||||
|
||||
|
||||
class TestTwitpostBot(BotTestCase, DefaultTests):
|
||||
bot_name = "twitpost"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from unittest.mock import patch
|
||||
import sys
|
||||
from typing import Dict, Any, Optional
|
||||
from zulip_bots.test_lib import BotTestCase, DefaultTests, get_bot_message_handler, StubBotHandler
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@ from unittest.mock import patch
|
|||
from requests.exceptions import HTTPError, ConnectionError
|
||||
|
||||
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler
|
||||
from typing import Any, Union, Dict
|
||||
from typing import Dict
|
||||
|
||||
class TestYoutubeBot(BotTestCase, DefaultTests):
|
||||
bot_name = "youtube"
|
||||
normal_config = {'key': '12345678',
|
||||
|
|
Loading…
Reference in a new issue