Small refactoring of telegram api server

This commit is contained in:
Alex Root Junior 2019-11-17 22:20:29 +02:00
parent 0e35b6f55e
commit a46cd6d001
6 changed files with 43 additions and 26 deletions

View file

@ -0,0 +1,11 @@
from aiogram.api.client.telegram 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"