zulip_bots: Move from mock to unittest.mock in most files.
This commit is contained in:
parent
ae76aa8f72
commit
b46a079804
|
@ -1,7 +1,7 @@
|
|||
from zulip_bots.test_lib import BotTestCase
|
||||
|
||||
from contextlib import contextmanager
|
||||
from mock import MagicMock
|
||||
from unittest.mock import MagicMock
|
||||
from zulip_bots.bots.connect_four.connect_four import *
|
||||
|
||||
class TestConnectFourBot(BotTestCase):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from zulip_bots.test_lib import (
|
||||
get_bot_message_handler,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
from zulip_bots.test_lib import BotTestCase
|
||||
|
||||
class TestJiraBot(BotTestCase):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from zulip_bots.test_lib import BotTestCase
|
||||
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
|
||||
class TestTictactoeBot(BotTestCase):
|
||||
bot_name = 'tictactoe'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
import sys
|
||||
from typing import Dict, Any, Optional
|
||||
from zulip_bots.test_lib import BotTestCase, get_bot_message_handler, StubBotHandler
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import mock
|
||||
from mock import MagicMock, patch
|
||||
from unittest import mock
|
||||
from unittest.mock import MagicMock, patch
|
||||
from zulip_bots.test_lib import BotTestCase
|
||||
|
||||
class TestXkcdBot(BotTestCase):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from unittest import TestCase
|
||||
from mock import MagicMock, patch, ANY
|
||||
from unittest.mock import MagicMock, patch, ANY
|
||||
from zulip_bots.lib import (
|
||||
ExternalBotHandler,
|
||||
StateHandler,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
from unittest import TestCase
|
||||
|
||||
from typing import List, Dict, Any, Tuple
|
||||
|
|
|
@ -15,7 +15,7 @@ from unittest import TestCase
|
|||
|
||||
if six.PY2:
|
||||
import mock
|
||||
from mock import patch
|
||||
from unittest.mock import patch
|
||||
else:
|
||||
from unittest import mock
|
||||
from unittest.mock import patch
|
||||
|
|
Loading…
Reference in a new issue