1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Updated tests for added newlines in 6868643063.

This commit is contained in:
Tim Graham
2014-08-12 20:16:04 -04:00
parent 6868643063
commit d38a00332e
4 changed files with 24 additions and 24 deletions

View File

@@ -148,17 +148,17 @@ class CachedLoader(TestCase):
)
class RenderToStringTest(TestCase):
def test_basic(self):
self.assertEqual(loader.render_to_string('test_context.html'), 'obj:')
self.assertEqual(loader.render_to_string('test_context.html'), 'obj:\n')
def test_basic_context(self):
self.assertEqual(loader.render_to_string('test_context.html',
{'obj': 'test'}), 'obj:test')
{'obj': 'test'}), 'obj:test\n')
def test_existing_context_kept_clean(self):
context = Context({'obj': 'before'})
output = loader.render_to_string('test_context.html', {'obj': 'after'},
context_instance=context)
self.assertEqual(output, 'obj:after')
self.assertEqual(output, 'obj:after\n')
self.assertEqual(context['obj'], 'before')
def test_empty_list(self):