def test_should_have_image_as_content_type(self): result = views.render_image_to_response("foo.jpg") self.assertEquals("image/jpg", result['content-type'])
def test_should_inlude_file_data_in_response_content(self): result = views.render_image_to_response("foo.jpg") self.assertEquals("mocked_binary:foo.jpg", result.content)