Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3a73e1

Browse files
committed
Added test for markdown in saved dashboard descriptions, refs #115
1 parent 1340b9b commit c3a73e1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def execute_sql_permission():
2323
@pytest.fixture
2424
def saved_dashboard(dashboard_db):
2525
dashboard = Dashboard.objects.create(
26-
slug="test", title="Test dashboard", view_policy="public"
26+
slug="test",
27+
title="Test dashboard",
28+
description="This [supports markdown](http://example.com/)",
29+
view_policy="public",
2730
)
2831
dashboard.queries.create(sql="select 11 + 33")
2932
dashboard.queries.create(sql="select 22 + 55")

test_project/test_dashboard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ def test_saved_dashboard(client, admin_client, dashboard_db, saved_dashboard):
8282
assert b"44" in response.content
8383
assert b"77" in response.content
8484
assert b">count<" in response.content
85+
# And test markdown support
86+
assert (
87+
b'<a href="http://example.com/" rel="nofollow">supports markdown</a>'
88+
in response.content
89+
)
8590

8691

8792
def test_many_long_column_names(admin_client, dashboard_db):

0 commit comments

Comments
 (0)