def test_there_is_a_correct_templatetag_library():
"""
see https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/
"""
from django_performance_testing.templatetags import djpt_limits
assert hasattr(djpt_limits, 'register')
assert isinstance(djpt_limits.register, template.Library)
assert 'djptlimit' in djpt_limits.register.tags
# The below tests are based on the registry's content. Tests will rely on the
# global defaults that are tested elsewhere in the test*registry*.py files
test_template_limit_blocks.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录