mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 22:45:09 +01:00
Update Fallback Test-Bots (#2451)
This commit is contained in:
parent
7abacb000b
commit
9949b44560
2 changed files with 14 additions and 21 deletions
|
@ -28,26 +28,17 @@ from telegram.error import RetryAfter, TimedOut
|
|||
# Provide some public fallbacks so it's easy for contributors to run tests on their local machine
|
||||
# These bots are only able to talk in our test chats, so they are quite useless for other
|
||||
# purposes than testing.
|
||||
FALLBACKS = [
|
||||
{
|
||||
'token': '579694714:AAHRLL5zBVy4Blx2jRFKe1HlfnXCg08WuLY',
|
||||
'payment_provider_token': '284685063:TEST:NjQ0NjZlNzI5YjJi',
|
||||
'chat_id': '675666224',
|
||||
'super_group_id': '-1001310911135',
|
||||
'channel_id': '@pythontelegrambottests',
|
||||
'bot_name': 'PTB tests fallback 1',
|
||||
'bot_username': '@ptb_fallback_1_bot',
|
||||
},
|
||||
{
|
||||
'token': '558194066:AAEEylntuKSLXj9odiv3TnX7Z5KY2J3zY3M',
|
||||
'payment_provider_token': '284685063:TEST:YjEwODQwMTFmNDcy',
|
||||
'chat_id': '675666224',
|
||||
'super_group_id': '-1001221216830',
|
||||
'channel_id': '@pythontelegrambottests',
|
||||
'bot_name': 'PTB tests fallback 2',
|
||||
'bot_username': '@ptb_fallback_2_bot',
|
||||
},
|
||||
]
|
||||
FALLBACKS = (
|
||||
'W3sidG9rZW4iOiAiNTc5Njk0NzE0OkFBRnBLOHc2emtrVXJENHhTZVl3RjNNTzhlLTRHcm1jeTdjIiwgInBheW1lbnRfc'
|
||||
'HJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6TmpRME5qWmxOekk1WWpKaSIsICJjaGF0X2lkIjogIjY3NTY2Nj'
|
||||
'IyNCIsICJzdXBlcl9ncm91cF9pZCI6ICItMTAwMTMxMDkxMTEzNSIsICJjaGFubmVsX2lkIjogIkBweXRob250ZWxlZ3J'
|
||||
'hbWJvdHRlc3RzIiwgImJvdF9uYW1lIjogIlBUQiB0ZXN0cyBmYWxsYmFjayAxIiwgImJvdF91c2VybmFtZSI6ICJAcHRi'
|
||||
'X2ZhbGxiYWNrXzFfYm90In0sIHsidG9rZW4iOiAiNTU4MTk0MDY2OkFBRndEUElGbHpHVWxDYVdIdFRPRVg0UkZyWDh1O'
|
||||
'URNcWZvIiwgInBheW1lbnRfcHJvdmlkZXJfdG9rZW4iOiAiMjg0Njg1MDYzOlRFU1Q6WWpFd09EUXdNVEZtTkRjeSIsIC'
|
||||
'JjaGF0X2lkIjogIjY3NTY2NjIyNCIsICJzdXBlcl9ncm91cF9pZCI6ICItMTAwMTIyMTIxNjgzMCIsICJjaGFubmVsX2l'
|
||||
'kIjogIkBweXRob250ZWxlZ3JhbWJvdHRlc3RzIiwgImJvdF9uYW1lIjogIlBUQiB0ZXN0cyBmYWxsYmFjayAyIiwgImJv'
|
||||
'dF91c2VybmFtZSI6ICJAcHRiX2ZhbGxiYWNrXzJfYm90In1d'
|
||||
)
|
||||
|
||||
GITHUB_ACTION = os.getenv('GITHUB_ACTION', None)
|
||||
BOTS = os.getenv('BOTS', None)
|
||||
|
@ -56,6 +47,8 @@ if GITHUB_ACTION is not None and BOTS is not None and JOB_INDEX is not None:
|
|||
BOTS = json.loads(base64.b64decode(BOTS).decode('utf-8'))
|
||||
JOB_INDEX = int(JOB_INDEX)
|
||||
|
||||
FALLBACKS = json.loads(base64.b64decode(FALLBACKS).decode('utf-8'))
|
||||
|
||||
|
||||
def get(name, fallback):
|
||||
# If we have TOKEN, PAYMENT_PROVIDER_TOKEN, CHAT_ID, SUPER_GROUP_ID,
|
||||
|
|
|
@ -423,7 +423,7 @@ class TestBot:
|
|||
assert new_message.poll.is_closed
|
||||
|
||||
@flaky(5, 1)
|
||||
@pytest.mark.timeout(10)
|
||||
@pytest.mark.timeout(20)
|
||||
def test_send_close_date_default_tz(self, tz_bot, super_group_id):
|
||||
question = 'Is this a test?'
|
||||
answers = ['Yes', 'No', 'Maybe']
|
||||
|
|
Loading…
Reference in a new issue