Skip to content

Commit

Permalink
Rename me to current_user
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Dec 17, 2024
1 parent 01c6a07 commit 54c4442
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/integration/assessment/test_dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def test_redash_dashboard_ownership_is_me(runtime_ctx) -> None:

owner = runtime_ctx.dashboard_ownership.owner_of(dashboard)

me = runtime_ctx.workspace_client.current_user.me()
assert owner == me.user_name
current_user = runtime_ctx.workspace_client.current_user.me()
assert owner == current_user.user_name


def test_lakeview_dashboard_ownership_is_me(runtime_ctx, make_lakeview_dashboard) -> None:
Expand All @@ -85,5 +85,5 @@ def test_lakeview_dashboard_ownership_is_me(runtime_ctx, make_lakeview_dashboard

owner = runtime_ctx.dashboard_ownership.owner_of(dashboard)

me = runtime_ctx.workspace_client.current_user.me()
assert owner == me.user_name
current_user = runtime_ctx.workspace_client.current_user.me()
assert owner == current_user.user_name
6 changes: 3 additions & 3 deletions tests/integration/framework/test_owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ def test_file_owner(make_workspace_file, ws):


def test_home_directory_owner_is_me(runtime_ctx) -> None:
me = runtime_ctx.workspace_client.current_user.me()
home = f"/Users/{me.user_name}"
current_user = runtime_ctx.workspace_client.current_user.me()
home = f"/Users/{current_user.user_name}"

name = runtime_ctx.workspace_path_ownership.owner_of_path(home)

assert name == me.user_name
assert name == current_user.user_name


def test_workspace_path_owner_of_invalid_path(runtime_ctx) -> None:
Expand Down

0 comments on commit 54c4442

Please sign in to comment.