1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #1214 from SwissCorePy/master

new deprecated decorator
This commit is contained in:
Badiboy
2021-06-30 15:01:46 +03:00
committed by GitHub
2 changed files with 31 additions and 15 deletions

View File

@ -19,6 +19,14 @@ if not should_skip:
CHAT_ID = os.environ['CHAT_ID']
GROUP_ID = os.environ['GROUP_ID']
def _new_test():
pass
@util.deprecated(alternative=_new_test)
def _test():
pass
@pytest.mark.skipif(should_skip, reason="No environment variables configured")
class TestTeleBot:
@ -615,6 +623,9 @@ class TestTeleBot:
tb.process_new_updates([update])
time.sleep(1)
assert update.message.text == 'got' * 2
def test_deprecated_dec(self):
_test()
def test_chat_permissions(self):
return # CHAT_ID is private chat, no permissions can be set