mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Small refactoring of telegram api server
This commit is contained in:
parent
0e35b6f55e
commit
a46cd6d001
6 changed files with 43 additions and 26 deletions
11
tests/test_api/test_client/test_api_server.py
Normal file
11
tests/test_api/test_client/test_api_server.py
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue