diff --git a/Pipfile b/Pipfile index 1755f8f..332c15d 100644 --- a/Pipfile +++ b/Pipfile @@ -4,12 +4,14 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] -sphinx = "*" +pytest = "==5.4.2" +pytest-django = "==3.9.0" +recommonmark = "==0.6.0" +sphinx = "==3.0.3" +sphinx-rtd-theme = "==0.4.3" [packages] django = "==3.0.6" -recommonmark = "*" -sphinx-rtd-theme = "*" [requires] python_version = "3.8" diff --git a/bootstrap_components/templatetags/util.py b/bootstrap_components/templatetags/util.py index d0ad6c2..876ddfb 100644 --- a/bootstrap_components/templatetags/util.py +++ b/bootstrap_components/templatetags/util.py @@ -1,6 +1,8 @@ from django import template + register = template.Library() + @register.simple_tag def define(val=None): - return val \ No newline at end of file + return val diff --git a/bootstrap_components/tests/test_render.py b/bootstrap_components/tests/test_render.py new file mode 100644 index 0000000..99f6f64 --- /dev/null +++ b/bootstrap_components/tests/test_render.py @@ -0,0 +1,10 @@ +from django.urls import reverse + + +def test_render(client): + # TODO: uncomment when demo URL active + # url = reverse('demo') + # resp = client.get(url, secure=True) + # assert resp.status_code == 200 + # TODO: assert template rendered successfully + pass diff --git a/bootstrap_components/tests/urls.py b/bootstrap_components/tests/urls.py new file mode 100644 index 0000000..75e0e11 --- /dev/null +++ b/bootstrap_components/tests/urls.py @@ -0,0 +1,7 @@ +# TODO: Figure out how to map a URL specifically for testing + +# TODO: Use a generic template view to render the demo template + +# REVIEW: Where is the ideal location to place the demo template? +# The templates directory under a new namespace? +# A Different templates directory inside the tests folder?