Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed May 10, 2023
1 parent 2e08599 commit dbe461c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions h/cli/commands/authclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ def authclient():
@click.option(
"--redirect-uri",
prompt=False,
help="URI for browser redirect after authorization. Required if grant type is 'authorization_code'"
help="URI for browser redirect after authorization. Required if grant type is 'authorization_code'",
)
@click.option(
"--grant-type",
type=click.Choice(GrantType.__members__),
prompt=False,
help="An allowable grant type"
help="An allowable grant type",
)
@click.pass_context
def add(
Expand Down
19 changes: 15 additions & 4 deletions tests/h/cli/commands/authclient_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,21 @@ def test_it_prints_the_id_and_secret_for_confidential_client(
def test_it_creates_an_authclient_with_grant_type(self, cli, cliconfig, db_session):
result = cli.invoke(
authclient_cli.add,
["--name", "AuthCode", "--authority", "example.org", "--type", "public",
"--grant-type", "authorization_code",
"--redirect-uri", "http://localhost:5000/app.html"], obj=cliconfig)

[
"--name",
"AuthCode",
"--authority",
"example.org",
"--type",
"public",
"--grant-type",
"authorization_code",
"--redirect-uri",
"http://localhost:5000/app.html",
],
obj=cliconfig,
)

assert not result.exit_code

authclient = (
Expand Down

0 comments on commit dbe461c

Please sign in to comment.