mirror of
https://github.com/jazzband/django-dbtemplates.git
synced 2026-05-23 14:45:53 +00:00
updated tests to be not as old as the hills
git-svn-id: https://django-dbtemplates.googlecode.com/svn/trunk@33 cfb8ba98-e953-0410-9cff-959ffddf5974 committer: leidel <leidel@cfb8ba98-e953-0410-9cff-959ffddf5974> --HG-- extra : convert_revision : 7873faa6befd6882a220cd1b5c3e8e78021ff4c0
This commit is contained in:
parent
c369ef4a7f
commit
b92b8d8749
1 changed files with 3 additions and 3 deletions
|
|
@ -77,13 +77,13 @@ __test__ = {'API_TESTS':"""
|
|||
>>> t2
|
||||
<Template: sub.html>
|
||||
>>> Template.objects.filter(sites=test_site)
|
||||
[<Template: base.html>, <Template: sub.html>]
|
||||
[<Template: 404.html>, <Template: 500.html>, <Template: base.html>, <Template: sub.html>]
|
||||
>>> t2.sites.all()
|
||||
[<Site: example.com>]
|
||||
>>> from dbtemplates.loader import load_template_source
|
||||
>>> loader.template_source_loaders = [load_template_source]
|
||||
>>> loader.get_template("base.html").render(Context({'title':'MainPage'}))
|
||||
'<html><head></head><body>Welcome at MainPage</body></html>'
|
||||
u'<html><head></head><body>Welcome at MainPage</body></html>'
|
||||
>>> loader.get_template("sub.html").render(Context({'title':'SubPage'}))
|
||||
'<html><head></head><body>This is SubPage</body></html>'
|
||||
u'<html><head></head><body>This is SubPage</body></html>'
|
||||
"""}
|
||||
|
|
|
|||
Loading…
Reference in a new issue