Merge pull request #3855 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.0

Bump python-telegram-bot from 12.8 to 13.0
This commit is contained in:
Matthias 2020-10-13 06:23:15 +02:00 committed by GitHub
commit 5f0d1d609e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 14 deletions

View File

@ -5,7 +5,7 @@ ccxt==1.36.2
multidict==4.7.6 multidict==4.7.6
aiohttp==3.6.3 aiohttp==3.6.3
SQLAlchemy==1.3.19 SQLAlchemy==1.3.19
python-telegram-bot==12.8 python-telegram-bot==13.0
arrow==0.17.0 arrow==0.17.0
cachetools==4.1.1 cachetools==4.1.1
requests==2.24.0 requests==2.24.0

View File

@ -297,7 +297,7 @@ def default_conf(testdatadir):
@pytest.fixture @pytest.fixture
def update(): def update():
_update = Update(0) _update = Update(0)
_update.message = Message(0, 0, datetime.utcnow(), Chat(0, 0)) _update.message = Message(0, datetime.utcnow(), Chat(0, 0))
return _update return _update

View File

@ -82,7 +82,7 @@ def test_telegram_init(default_conf, mocker, caplog) -> None:
assert log_has(message_str, caplog) assert log_has(message_str, caplog)
def test_cleanup(default_conf, mocker) -> None: def test_cleanup(default_conf, mocker, ) -> None:
updater_mock = MagicMock() updater_mock = MagicMock()
updater_mock.stop = MagicMock() updater_mock.stop = MagicMock()
mocker.patch('freqtrade.rpc.telegram.Updater', updater_mock) mocker.patch('freqtrade.rpc.telegram.Updater', updater_mock)
@ -92,13 +92,9 @@ def test_cleanup(default_conf, mocker) -> None:
assert telegram._updater.stop.call_count == 1 assert telegram._updater.stop.call_count == 1
def test_authorized_only(default_conf, mocker, caplog) -> None: def test_authorized_only(default_conf, mocker, caplog, update) -> None:
patch_exchange(mocker) patch_exchange(mocker)
chat = Chat(0, 0)
update = Update(randint(1, 100))
update.message = Message(randint(1, 100), 0, datetime.utcnow(), chat)
default_conf['telegram']['enabled'] = False default_conf['telegram']['enabled'] = False
bot = FreqtradeBot(default_conf) bot = FreqtradeBot(default_conf)
patch_get_signal(bot, (True, False)) patch_get_signal(bot, (True, False))
@ -114,7 +110,7 @@ def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> None:
patch_exchange(mocker) patch_exchange(mocker)
chat = Chat(0xdeadbeef, 0) chat = Chat(0xdeadbeef, 0)
update = Update(randint(1, 100)) update = Update(randint(1, 100))
update.message = Message(randint(1, 100), 0, datetime.utcnow(), chat) update.message = Message(randint(1, 100), datetime.utcnow(), chat)
default_conf['telegram']['enabled'] = False default_conf['telegram']['enabled'] = False
bot = FreqtradeBot(default_conf) bot = FreqtradeBot(default_conf)
@ -127,12 +123,9 @@ def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> None:
assert not log_has('Exception occurred within Telegram module', caplog) assert not log_has('Exception occurred within Telegram module', caplog)
def test_authorized_only_exception(default_conf, mocker, caplog) -> None: def test_authorized_only_exception(default_conf, mocker, caplog, update) -> None:
patch_exchange(mocker) patch_exchange(mocker)
update = Update(randint(1, 100))
update.message = Message(randint(1, 100), 0, datetime.utcnow(), Chat(0, 0))
default_conf['telegram']['enabled'] = False default_conf['telegram']['enabled'] = False
bot = FreqtradeBot(default_conf) bot = FreqtradeBot(default_conf)
@ -146,7 +139,7 @@ def test_authorized_only_exception(default_conf, mocker, caplog) -> None:
assert log_has('Exception occurred within Telegram module', caplog) assert log_has('Exception occurred within Telegram module', caplog)
def test_telegram_status(default_conf, update, mocker, fee, ticker,) -> None: def test_telegram_status(default_conf, update, mocker) -> None:
update.message.chat.id = "123" update.message.chat.id = "123"
default_conf['telegram']['enabled'] = False default_conf['telegram']['enabled'] = False
default_conf['telegram']['chat_id'] = "123" default_conf['telegram']['chat_id'] = "123"