-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% load viewflow %} | ||
{% viewpart field 'username' %} | ||
AAA | ||
{% endviewpart %} | ||
|
||
{% for field in form.visible_fields %} | ||
{% viewpart field field.name %} | ||
{{ field.name }} | ||
{% endviewpart %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from django.template import Template, Context | ||
from django.test import TestCase | ||
|
||
|
||
class TestRenderTag(TestCase): | ||
DEFAULT_RENDER_TEMPLATE = """ | ||
{% load viewflow %} | ||
{% viewform 'unit/test_render_form.html' %} | ||
{% viewpart field 'username' %} | ||
REDEFINED | ||
{% endviewpart %} | ||
{% endviewform %} | ||
""" | ||
|
||
def test_render_form_succeed(self): | ||
""" | ||
""" | ||
template = Template(TestRenderTag.DEFAULT_RENDER_TEMPLATE) | ||
result = template.render(Context({'var': 'varvalue'})) | ||
self.assertIn('REDEFINED', result) |