mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Fixed tests
This commit is contained in:
parent
a2bafb27e4
commit
6477bf3cf8
2 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ class Command(BaseFilter):
|
|||
if isinstance(allowed_command, Pattern): # Regexp
|
||||
result = allowed_command.match(command.command)
|
||||
if result:
|
||||
return replace(command, match=result)
|
||||
return replace(command, regexp_match=result)
|
||||
elif command.command == allowed_command: # String
|
||||
return command
|
||||
raise CommandException("Command did not match pattern")
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ExceptionMessageFilter(BaseFilter):
|
|||
class Config:
|
||||
arbitrary_types_allowed = True
|
||||
|
||||
@validator("match")
|
||||
@validator("pattern")
|
||||
def _validate_match(cls, value: Union[str, Pattern[str]]) -> Union[str, Pattern[str]]:
|
||||
if isinstance(value, str):
|
||||
return re.compile(value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue