﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15826	TestCase assertions should work with TemplateResponse	bmihelac	mmcnickle	"When using  assertContains for testing class based generic views or other views that returns TemplateResponse, following error is raised:

{{{
ContentNotRenderedError: The response content must be rendered before it can be accessed.
}}}

Example:

{{{
        response = SomeView.as_view()(request)
        self.assertContains(response, 'some content')
}}}


This can be avoided with adding response.render() before assertion is called, but in my opinion assertContain should check if content is rendered instead.
"	Bug	closed	Testing framework	1.3	Normal	fixed		mmcnickle	Accepted	1	0	0	0	0	0
