Drop i18n_patterns prefix parameter.
[fnpdjango.git] / tests / tests / test_templatetags_macros.py
diff --git a/tests/tests/test_templatetags_macros.py b/tests/tests/test_templatetags_macros.py
new file mode 100644 (file)
index 0000000..8fd7823
--- /dev/null
@@ -0,0 +1,19 @@
+from __future__ import unicode_literals
+
+from django.test import TestCase
+from django.template import Template, Context
+
+
+class MacrosTests(TestCase):
+    def test_macro(self):
+        tmpl = Template("""
+            {% load macros %}
+            {% macro my_macro arg1 %}
+            Parameter: {{ arg1 }} <br/>
+            {% endmacro %}
+            {% usemacro my_macro "String parameter" %}
+        """)
+        self.assertEqual(
+            tmpl.render(Context()).strip(),
+            "Parameter: String parameter <br/>"
+        )