Skip to content

Commit

Permalink
fix flake8 error
Browse files Browse the repository at this point in the history
  • Loading branch information
PanderMusubi committed Dec 31, 2024
1 parent b6f8515 commit 971beee
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions tests/test_bootstrap4/test_render_icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,11 @@ def icon_title():
{{ render_icon('heart', title='Heart') }}
''')

@app.route('/icon-desc')
def icon_desc():
@app.route('/icon-desc-classes')
def icon_desc_classes():
return render_template_string('''
{% from 'bootstrap4/utils.html' import render_icon %}
{{ render_icon('heart', desc='A heart.') }}
''')

@app.route('/icon-classes')
def icon_classes():
return render_template_string('''
{% from 'bootstrap4/utils.html' import render_icon %}
{{ render_icon('heart', classes='text-success bg-light') }}
{{ render_icon('heart', desc='A heart.', classes='text-success bg-light') }}
''')

response = client.get('/icon')
Expand Down Expand Up @@ -78,14 +71,10 @@ def icon_classes():
assert 'bootstrap-icons.svg#heart' in data
assert '<title>Heart</title>' in data

response = client.get('/icon-desc')
response = client.get('/icon-desc-classes')
data = response.get_data(as_text=True)
assert 'bootstrap-icons.svg#heart' in data
assert '<desc>A heart.</desc>' in data

response = client.get('/icon-classes')
data = response.get_data(as_text=True)
assert 'bootstrap-icons.svg#heart' in data
assert 'class="bi text-success bg-light"' in data


Expand Down

0 comments on commit 971beee

Please sign in to comment.