Skip to content

Commit 67424dc

Browse files
author
Simen Abelsen
committed
fixup! Add tests for dashboard utilities
1 parent edd62b1 commit 67424dc

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

tests/integration/web/webfront_test.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -804,16 +804,21 @@ def test_given_dashboard_id_for_other_account_when_not_shared_then_return_404(
804804
with pytest.raises(Http404):
805805
find_dashboard(non_admin_account, dashboard_id=other_dashboard.id)
806806

807-
def test_shared_by_other_attribute_for_own_dashboard(self, db, non_admin_account):
808-
"""Tests that shared_by_other is False for own dashboards"""
807+
def test_given_own_dashboard_then_find_dashboard_sets_shared_by_other_to_false(
808+
self, db, non_admin_account
809+
):
810+
"""Tests that find_dashboard sets shared_by_other to False for own dashboards"""
809811
dashboard = create_dashboard(non_admin_account, name="Own", is_shared=True)
810812
found_dashboard = find_dashboard(non_admin_account, dashboard_id=dashboard.id)
811813
assert found_dashboard.shared_by_other is False
812814

813-
def test_shared_by_other_attribute_for_shared_dashboard_of_other_account(
815+
def test_given_dashboard_of_another_account_then_find_dashboard_sets_shared_by_other_to_true( # noqa: E501
814816
self, db, non_admin_account, admin_account
815817
):
816-
"""Tests that shared_by_other is True for shared dashboards of other accounts"""
818+
"""
819+
Test that find_dashboard sets shared_by_other to True for other a dashboard
820+
of another account
821+
"""
817822
other_dashboard = create_dashboard(admin_account, name="Other", is_shared=True)
818823
found_dashboard = find_dashboard(
819824
non_admin_account, dashboard_id=other_dashboard.id

0 commit comments

Comments
 (0)