Add tests for BaseSession and TelegramAPIServer

This commit is contained in:
Alex Root Junior 2019-11-16 00:52:18 +02:00
parent c824b298c9
commit a24708d589
12 changed files with 159 additions and 9 deletions

View file

@ -0,0 +1,11 @@
from aiogram.api.session.base import PRODUCTION
class TestAPIServer:
def test_method_url(self):
method_url = PRODUCTION.api_url(token="TOKEN", method="apiMethod")
assert method_url == "https://api.telegram.org/botTOKEN/apiMethod"
def test_file_url(self):
file_url = PRODUCTION.file_url(token="TOKEN", path="path")
assert file_url == "https://api.telegram.org/file/botTOKEN/path"