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:
		| @@ -5,7 +5,7 @@ ccxt==1.36.2 | ||||
| multidict==4.7.6 | ||||
| aiohttp==3.6.3 | ||||
| SQLAlchemy==1.3.19 | ||||
| python-telegram-bot==12.8 | ||||
| python-telegram-bot==13.0 | ||||
| arrow==0.17.0 | ||||
| cachetools==4.1.1 | ||||
| requests==2.24.0 | ||||
|   | ||||
| @@ -297,7 +297,7 @@ def default_conf(testdatadir): | ||||
| @pytest.fixture | ||||
| def update(): | ||||
|     _update = Update(0) | ||||
|     _update.message = Message(0, 0, datetime.utcnow(), Chat(0, 0)) | ||||
|     _update.message = Message(0, datetime.utcnow(), Chat(0, 0)) | ||||
|     return _update | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -82,7 +82,7 @@ def test_telegram_init(default_conf, mocker, caplog) -> None: | ||||
|     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.stop = MagicMock() | ||||
|     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 | ||||
|  | ||||
|  | ||||
| def test_authorized_only(default_conf, mocker, caplog) -> None: | ||||
| def test_authorized_only(default_conf, mocker, caplog, update) -> None: | ||||
|     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 | ||||
|     bot = FreqtradeBot(default_conf) | ||||
|     patch_get_signal(bot, (True, False)) | ||||
| @@ -114,7 +110,7 @@ def test_authorized_only_unauthorized(default_conf, mocker, caplog) -> None: | ||||
|     patch_exchange(mocker) | ||||
|     chat = Chat(0xdeadbeef, 0) | ||||
|     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 | ||||
|     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) | ||||
|  | ||||
|  | ||||
| def test_authorized_only_exception(default_conf, mocker, caplog) -> None: | ||||
| def test_authorized_only_exception(default_conf, mocker, caplog, update) -> None: | ||||
|     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 | ||||
|  | ||||
|     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) | ||||
|  | ||||
|  | ||||
| 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" | ||||
|     default_conf['telegram']['enabled'] = False | ||||
|     default_conf['telegram']['chat_id'] = "123" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user