Skip to content

Commit df4fe5a

Browse files
committed
remove async hook tests
1 parent cad6862 commit df4fe5a

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

tests/hook/test_hook_support.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
from unittest.mock import ANY, AsyncMock, MagicMock
1+
from unittest.mock import ANY, MagicMock
22

33
import pytest
44

55
from openfeature.client import ClientMetadata
66
from openfeature.evaluation_context import EvaluationContext
77
from openfeature.flag_evaluation import FlagEvaluationDetails, FlagType
8-
from openfeature.hook import AsyncHook, Hook, HookContext
8+
from openfeature.hook import Hook, HookContext
99
from openfeature.hook._hook_support import (
1010
after_all_hooks,
1111
after_hooks,
@@ -86,23 +86,6 @@ def test_error_hooks_run_error_method(mock_hook):
8686
)
8787

8888

89-
@pytest.mark.asyncio
90-
async def test_error_hooks_run_error_method_async(mock_hook_async):
91-
# Given
92-
hook_context = HookContext("flag_key", FlagType.BOOLEAN, True, "")
93-
hook_hints = MappingProxyType({})
94-
# When
95-
await error_hooks_async(
96-
FlagType.BOOLEAN, hook_context, Exception, [mock_hook_async], hook_hints
97-
)
98-
# Then
99-
mock_hook_async.supports_flag_value_type.assert_called_once()
100-
mock_hook_async.error.assert_called_once()
101-
mock_hook_async.error.assert_called_with(
102-
hook_context=hook_context, exception=ANY, hints=hook_hints
103-
)
104-
105-
10689
def test_before_hooks_run_before_method(mock_hook):
10790
# Given
10891
hook_context = HookContext("flag_key", FlagType.BOOLEAN, True, "")

0 commit comments

Comments
 (0)