We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bc2010 commit d198ee0Copy full SHA for d198ee0
rsocket/cli/command.py
@@ -152,6 +152,8 @@ def get_request_type(request: bool,
152
if metadata_push:
153
return RequestType.metadata_push
154
155
+ raise click.UsageError('No interaction method specified (eg. --request)')
156
+
157
158
@click.command(name='rsocket-py', help='Supported connection strings: tcp/ws/wss')
159
@click.option('--im', '--interactionModel', 'interaction_model', is_flag=False,
tests/rsocket/test_cli_command.py
@@ -108,13 +108,17 @@ def test_normalize_data_from_stdin_takes_precedence_over_load_from_file():
108
assert data == fixture_data_stdin
109
110
111
-def test_normalize_limit_rate():
112
- result = normalize_limit_rate(None)
+@pytest.mark.parametrize('limit_rate, expected', (
+ (None, MAX_REQUEST_N),
113
+))
114
+def test_normalize_limit_rate(limit_rate, expected):
115
+ result = normalize_limit_rate(limit_rate)
116
- assert result == MAX_REQUEST_N
117
+ assert result == expected
118
119
120
@pytest.mark.parametrize('is_request, stream, fnf, metadata_push, channel, interaction_model, expected', (
121
+ (None, None, None, None, None, None, Exception),
122
(True, None, None, None, None, None, RequestType.response),
123
(None, True, None, None, None, None, RequestType.stream),
124
(None, None, True, None, None, None, RequestType.fnf),
0 commit comments