We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 889eafb commit 51f99f3Copy full SHA for 51f99f3
1 file changed
tests/unit_tests/cli/test_cli.py
@@ -1138,6 +1138,26 @@ def test_login_with_unauthenticated_server(
1138
assert result.exit_code == 0
1139
1140
1141
+@responses.activate
1142
+def test_invalid_json(
1143
+ runner: CliRunner,
1144
+ config_with_auth: str,
1145
+ mock_authn_server: responses.RequestsMock,
1146
+):
1147
+ response = responses.add(
1148
+ responses.GET,
1149
+ "http://localhost:8000/config/oidc",
1150
+ body="blah blah",
1151
+ status=404,
1152
+ )
1153
+
1154
+ result = runner.invoke(main, ["-c", config_with_auth, "login"])
1155
1156
+ assert response.call_count == 1
1157
+ assert "Response does not contain a valid JSON object\n" == result.output
1158
+ assert result.exit_code == 0
1159
1160
1161
def test_logout_success(
1162
runner: CliRunner,
1163
config_with_auth: str,
0 commit comments