mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Rework middlewares
This commit is contained in:
parent
5487f3314b
commit
03252c878e
35 changed files with 1244 additions and 669 deletions
|
|
@ -2,7 +2,7 @@ from typing import Any, Dict
|
|||
|
||||
import pytest
|
||||
|
||||
from aiogram.utils.link import create_telegram_link, create_tg_link
|
||||
from aiogram.utils.link import BRANCH, create_telegram_link, create_tg_link, docs_url
|
||||
|
||||
|
||||
class TestLink:
|
||||
|
|
@ -22,3 +22,12 @@ class TestLink:
|
|||
)
|
||||
def test_create_telegram_link(self, base: str, params: Dict[str, Any], result: str):
|
||||
assert create_telegram_link(base, **params) == result
|
||||
|
||||
def test_fragment(self):
|
||||
assert (
|
||||
docs_url("test.html", fragment_="test")
|
||||
== f"https://docs.aiogram.dev/en/{BRANCH}/test.html#test"
|
||||
)
|
||||
|
||||
def test_docs(self):
|
||||
assert docs_url("test.html") == f"https://docs.aiogram.dev/en/{BRANCH}/test.html"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue