Skip to content

Commit

Permalink
Use clear_default_identity correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jwlodek committed Oct 1, 2024
1 parent c009522 commit c05daac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tiled/_tests/test_access_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ def test_top_level_access_control(context, enter_username_password):
with pytest.raises(KeyError):
bob_client["b"]
alice_client.logout()
bob_client.logout()

# Make sure clearing default identity works without raising an error.
bob_client.logout(clear_default=True)


def test_access_control_with_api_key_auth(context, enter_username_password):
Expand Down
2 changes: 1 addition & 1 deletion tiled/client/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def logout(self, clear_default=False):

# If requested, automatically clear the default identity
if clear_default:
self.clear_default_identity()
clear_default_identity(self.api_uri)

def revoke_session(self, session_id):
"""
Expand Down

0 comments on commit c05daac

Please sign in to comment.