bot tests: Remove unnecessary imports.

This commit is contained in:
neiljp (Neil Pilgrim) 2018-06-09 17:36:43 -07:00 committed by showell
parent 031510410b
commit 509991f26f
15 changed files with 6 additions and 29 deletions

View file

@ -1,10 +1,8 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests 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.bots.connect_four.connect_four import *
from zulip_bots.game_handler import BadMoveException from zulip_bots.game_handler import BadMoveException
from typing import Dict, Any, List from typing import Dict, List
class TestConnectFourBot(BotTestCase, DefaultTests): class TestConnectFourBot(BotTestCase, DefaultTests):

View file

@ -1,5 +1,4 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests from zulip_bots.test_lib import BotTestCase, DefaultTests
from typing import List
from unittest.mock import patch from unittest.mock import patch
from zulip_bots.bots.dropbox_share.test_util import ( from zulip_bots.bots.dropbox_share.test_util import (

View file

@ -5,8 +5,6 @@ from zulip_bots.test_lib import (
get_bot_message_handler, get_bot_message_handler,
) )
from typing import Any
class TestFollowUpBot(BotTestCase, DefaultTests): class TestFollowUpBot(BotTestCase, DefaultTests):
bot_name = "followup" bot_name = "followup"

View file

@ -1,8 +1,7 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests from zulip_bots.test_lib import BotTestCase, DefaultTests
from zulip_bots.game_handler import GameInstance from zulip_bots.game_handler import GameInstance
from contextlib import contextmanager from mock import patch
from mock import MagicMock, patch
from typing import Any, Dict, List from typing import Any, Dict, List

View file

@ -1,10 +1,8 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests 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.bots.game_of_fifteen.game_of_fifteen import GameOfFifteenModel
from zulip_bots.game_handler import BadMoveException from zulip_bots.game_handler import BadMoveException
from typing import Dict, Any, List, Tuple from typing import Dict, List, Tuple
class TestGameOfFifteenBot(BotTestCase, DefaultTests): class TestGameOfFifteenBot(BotTestCase, DefaultTests):

View file

@ -1,7 +1,6 @@
from unittest.mock import patch, MagicMock from unittest.mock import patch
from requests.exceptions import HTTPError, ConnectionError from requests.exceptions import HTTPError, ConnectionError
from typing import Any, Union
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler
class TestGiphyBot(BotTestCase, DefaultTests): class TestGiphyBot(BotTestCase, DefaultTests):

View file

@ -5,8 +5,6 @@ from zulip_bots.test_lib import (
get_bot_message_handler, get_bot_message_handler,
) )
from typing import Any
class TestGithubDetailBot(BotTestCase, DefaultTests): class TestGithubDetailBot(BotTestCase, DefaultTests):
bot_name = "github_detail" bot_name = "github_detail"
mock_config = {'owner': 'zulip', 'repo': 'zulip'} mock_config = {'owner': 'zulip', 'repo': 'zulip'}

View file

@ -1,7 +1,5 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests from zulip_bots.test_lib import BotTestCase, DefaultTests
from typing import Any
class TestHelpBot(BotTestCase, DefaultTests): class TestHelpBot(BotTestCase, DefaultTests):
bot_name = "help" bot_name = "help"

View file

@ -2,8 +2,6 @@ from unittest.mock import patch
from zulip_bots.test_lib import BotTestCase, DefaultTests from zulip_bots.test_lib import BotTestCase, DefaultTests
import requests
class TestIDoneThisBot(BotTestCase, DefaultTests): class TestIDoneThisBot(BotTestCase, DefaultTests):
bot_name = "idonethis" # type: str bot_name = "idonethis" # type: str

View file

@ -1,10 +1,8 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler, read_bot_fixture_data from zulip_bots.test_lib import BotTestCase, DefaultTests, StubBotHandler, read_bot_fixture_data
import simple_salesforce
from simple_salesforce.exceptions import SalesforceAuthenticationFailed from simple_salesforce.exceptions import SalesforceAuthenticationFailed
from contextlib import contextmanager from contextlib import contextmanager
from unittest.mock import patch from unittest.mock import patch
from typing import Any, Dict from typing import Any, Dict
import logging
@contextmanager @contextmanager

View file

@ -3,8 +3,6 @@ from zulip_bots.test_lib import (
DefaultTests, DefaultTests,
) )
from typing import Any
class TestSusiBot(BotTestCase, DefaultTests): class TestSusiBot(BotTestCase, DefaultTests):
bot_name = "susi" bot_name = "susi"

View file

@ -1,7 +1,6 @@
from zulip_bots.test_lib import BotTestCase, DefaultTests from zulip_bots.test_lib import BotTestCase, DefaultTests
from zulip_bots.game_handler import GameInstance from zulip_bots.game_handler import GameInstance
from unittest.mock import patch
from typing import List, Tuple, Any from typing import List, Tuple, Any

View file

@ -9,9 +9,6 @@ from zulip_bots.test_file_utils import (
) )
from unittest.mock import patch from unittest.mock import patch
import tweepy import tweepy
import os
import json
class TestTwitpostBot(BotTestCase, DefaultTests): class TestTwitpostBot(BotTestCase, DefaultTests):
bot_name = "twitpost" bot_name = "twitpost"

View file

@ -1,5 +1,4 @@
from unittest.mock import patch from unittest.mock import patch
import sys
from typing import Dict, Any, Optional from typing import Dict, Any, Optional
from zulip_bots.test_lib import BotTestCase, DefaultTests, get_bot_message_handler, StubBotHandler from zulip_bots.test_lib import BotTestCase, DefaultTests, get_bot_message_handler, StubBotHandler

View file

@ -2,7 +2,8 @@ from unittest.mock import patch
from requests.exceptions import HTTPError, ConnectionError from requests.exceptions import HTTPError, ConnectionError
from zulip_bots.test_lib import StubBotHandler, BotTestCase, DefaultTests, get_bot_message_handler 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): class TestYoutubeBot(BotTestCase, DefaultTests):
bot_name = "youtube" bot_name = "youtube"
normal_config = {'key': '12345678', normal_config = {'key': '12345678',