2727from ralph .exceptions import BackendParameterException , ConfigurationException
2828from ralph .models .edx .navigational .statements import UIPageClose
2929from ralph .models .xapi .navigation .statements import PageTerminated
30- from ralph .utils import iter_over_async
30+ from ralph .utils import execute_async
3131
3232from tests .factories import mock_instance
3333from tests .fixtures .backends import (
@@ -48,16 +48,14 @@ def test_cli_comma_separated_key_value_param_type():
4848 with pytest .raises (
4949 BadParameter ,
5050 match = (
51- "You should provide key=value pairs separated by commas, "
52- "e.g. foo=bar,bar=2"
51+ "You should provide key=value pairs separated by commas, e.g. foo=bar,bar=2"
5352 ),
5453 ):
5554 param_type .convert ("foo=bar,baz" , None , None )
5655 with pytest .raises (
5756 BadParameter ,
5857 match = (
59- "You should provide key=value pairs separated by commas, "
60- "e.g. foo=bar,bar=2"
58+ "You should provide key=value pairs separated by commas, e.g. foo=bar,bar=2"
6159 ),
6260 ):
6361 param_type .convert ("foo=bar," , None , None )
@@ -160,10 +158,7 @@ def test_cli_help_option():
160158
161159 assert result .exit_code == 0
162160 assert (
163- (
164- "-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO (default) or "
165- "DEBUG"
166- )
161+ "-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO (default) or DEBUG"
167162 ) in result .output
168163
169164
@@ -766,7 +761,7 @@ def test_cli_read_command_with_ws_backend(events, ws):
766761 # async context, thus we wrap it into a sync contextmanager.
767762 @contextmanager
768763 def websocket ():
769- yield from iter_over_async (ws )
764+ yield execute_async (ws )
770765
771766 with websocket ():
772767 runner = CliRunner ()
0 commit comments