mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Change mock return_value
This commit is contained in:
parent
2b36338ca2
commit
36aab46754
1 changed files with 4 additions and 4 deletions
|
|
@ -233,13 +233,13 @@ class TestActionContainer:
|
|||
|
||||
|
||||
class TestSceneHandlerWrapper:
|
||||
@pytest.mark.skipif("PyPy" in platform.python_implementation(), reason="Test skipped on PyPy.")
|
||||
# @pytest.mark.skipif("PyPy" in platform.python_implementation(), reason="Test skipped on PyPy.")
|
||||
async def test_scene_handler_wrapper_call(self):
|
||||
class MyScene(Scene):
|
||||
pass
|
||||
|
||||
# Mock objects
|
||||
handler_mock = AsyncMock()
|
||||
handler_mock = AsyncMock(return_value=42)
|
||||
state_mock = AsyncMock(spec=FSMContext)
|
||||
scenes_mock = AsyncMock(spec=ScenesManager)
|
||||
event_update_mock = Update(
|
||||
|
|
@ -265,13 +265,13 @@ class TestSceneHandlerWrapper:
|
|||
# Check whether result is correct
|
||||
assert result == handler_mock.return_value
|
||||
|
||||
@pytest.mark.skipif("PyPy" in platform.python_implementation(), reason="Test skipped on PyPy.")
|
||||
# @pytest.mark.skipif("PyPy" in platform.python_implementation(), reason="Test skipped on PyPy.")
|
||||
async def test_scene_handler_wrapper_call_with_after(self):
|
||||
class MyScene(Scene):
|
||||
pass
|
||||
|
||||
# Mock objects
|
||||
handler_mock = AsyncMock()
|
||||
handler_mock = AsyncMock(return_value=42)
|
||||
state_mock = AsyncMock(spec=FSMContext)
|
||||
scenes_mock = AsyncMock(spec=ScenesManager)
|
||||
event_update_mock = Update(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue