Skip to content

Commit

Permalink
fixup! fixup! Permissions as HTML page
Browse files Browse the repository at this point in the history
  • Loading branch information
mvalik committed Oct 12, 2023
1 parent 40cd633 commit 251461a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_api_v10.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,13 +894,13 @@ def test_permissions_endpoint(client):

r = client.get('/api/v1.0/permissions?html=1')
assert r.status_code == 200
assert r.content_type == 'text/html'
assert r.content_type.startswith('text/html')
assert f"<td>{config['PERMISSIONS'][0]['name']}</td>" in r.text
assert f"<td>{config['PERMISSIONS'][1]['name']}</td>" in r.text

r = client.get('/api/v1.0/permissions?testcase=greenwave-tests.test1&html=1')
assert r.status_code == 200
assert r.content_type == 'text/html'
assert r.content_type.startswith('text/html')
assert f"<td>{config['PERMISSIONS'][0]['name']}</td>" not in r.text
assert f"<td>{config['PERMISSIONS'][1]['name']}</td>" in r.text

Expand Down
2 changes: 1 addition & 1 deletion waiverdb/templates/permissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ <h1>
<td>{{ p["name"] }}</td>
<td>{{ p["description"] }}</td>
<td>{{ p["maintainers"] | map("urlize") | safe | join("<br />") | safe }}</td>
<td>{{ p["testcases"] | map("replace('-', '&#8209;')") | join("<br />") | safe }}</td>
<td>{{ p["testcases"] | replace('-', '&#8209;') | join("<br />") | safe }}</td>
<td>
{% if p["groups"] | length > 0 -%}
<span class="font-weight-bold">Groups:</span><br />
Expand Down

0 comments on commit 251461a

Please sign in to comment.