File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from django .template import Context , Template
4
4
5
- template = """
5
+ readme_template = """
6
6
{% load static %}
7
7
<head>
8
8
<link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
15
15
</body>
16
16
"""
17
17
18
+ classic_template = """
19
+ {% load static %}
20
+ <link rel="stylesheet" href="{% static 'fontawesome/css/all.min.css' %}">
21
+ """
22
+
18
23
19
- def test_template ():
24
+ def test_readme_template ():
20
25
"""Importing the package should work as described in the README."""
21
26
bootstrap_min_css = "bootstrap/css/bootstrap.min.css"
22
27
bootstrap_min_js = "bootstrap/js/bootstrap.bundle.min.js"
23
28
fontawesome_min_js = "fontawesome/js/all.min.js"
24
29
jquery_min_js = "bootstrap/js/jquery.min.js"
25
30
26
31
c = Context ()
27
- t = Template (template )
32
+ t = Template (readme_template )
28
33
html = t .render (c )
29
34
30
35
assert f'<link rel="stylesheet" href="/static/{ bootstrap_min_css } ">' in html
31
36
assert f'<script defer src="/static/{ fontawesome_min_js } "></script>' in html
32
37
assert f'<script src="/static/{ jquery_min_js } "></script>' in html
33
38
assert f'<script src="/static/{ bootstrap_min_js } "></script>' in html
39
+
40
+
41
+ def test_classic_fontawesome ():
42
+ """Non-JS powered, classic Font Awesome."""
43
+ fontawesome_min_css = "fontawesome/css/all.min.css"
44
+
45
+ c = Context ()
46
+ t = Template (classic_template )
47
+ html = t .render (c )
48
+
49
+ assert f'<link rel="stylesheet" href="/static/{ fontawesome_min_css } ">' in html
You can’t perform that action at this time.
0 commit comments