Skip to content

Commit

Permalink
Added tests scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
IshanManchanda committed May 19, 2020
1 parent 3a670d7 commit 4f4cf3d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 3 additions & 1 deletion bootstrap_components/templatetags/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django import template

register = template.Library()


@register.simple_tag
def define(val=None):
return val
return val
10 changes: 10 additions & 0 deletions bootstrap_components/tests/test_render.py
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions bootstrap_components/tests/urls.py
Original file line number Diff line number Diff line change
@@ -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?

0 comments on commit 4f4cf3d

Please sign in to comment.