mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 18:01:04 +00:00
Use AsyncMock with python 3.8 instead of asynctest
This commit is contained in:
parent
6f56f24296
commit
8e5cb067df
8 changed files with 123 additions and 105 deletions
|
|
@ -1,12 +1,14 @@
|
|||
import copy
|
||||
|
||||
import pytest
|
||||
from asynctest import CoroutineMock, patch
|
||||
|
||||
from aiogram.api.client.base import BaseBot
|
||||
from aiogram.api.client.session.aiohttp import AiohttpSession
|
||||
from aiogram.api.methods import GetMe
|
||||
|
||||
try:
|
||||
from asynctest import CoroutineMock, patch
|
||||
except ImportError:
|
||||
from unittest.mock import AsyncMock as CoroutineMock, patch
|
||||
|
||||
|
||||
class TestBaseBot:
|
||||
def test_init(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue