Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test_get_dashboard_unauthorized #1736

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions tests_new/integration_tests/modules/dashboards/test_dashboard.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import pytest
from assertpy import assert_that

from integration_tests.core.environment.utils import set_env_params
from integration_tests.errors import GqlError
from integration_tests.modules.dashboards.conftest import create_dataall_dashboard
from integration_tests.modules.dashboards.mutations import (
update_dashboard,
delete_dashboard,
approve_dashboard_share,
reject_dashboard_share,
)
from integration_tests.modules.dashboards.queries import (
search_dashboards,
get_dashboard,
list_dashboard_shares,
get_author_session,
get_reader_session,
)
from integration_tests.modules.dashboards.mutations import (
update_dashboard,
delete_dashboard,
approve_dashboard_share,
reject_dashboard_share,
)
from integration_tests.modules.dashboards.conftest import create_dataall_dashboard
from integration_tests.core.environment.utils import set_env_params
from integration_tests.errors import GqlError

UPDATED_DESC = 'new description'

Expand Down Expand Up @@ -45,9 +45,7 @@ def test_list_dashboards(client1, client2, session_id, dashboard1):


def test_get_dashboard_unauthorized(client2, dashboard1):
assert_that(get_dashboard).raises(GqlError).when_called_with(client2, dashboard1.dashboardUri).contains(
'UnauthorizedOperation', 'GET_DASHBOARD', dashboard1.dashboardUri
)
assert_that(get_dashboard(client2, dashboard1.dashboardUri)).contains_entry(restricted=None, environment=None)


def test_update_dashboard(client1, dashboard1):
Expand Down
Loading