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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user