def testDivChecksum(self):
    source = '<p>This is some test text.</p>'
    context = self._GetContext()
    template = django_template.Template(
        '{% checksummed_div %}'
        'someId'
        '{% divbody %}' + source + '{% endchecksummed_div %}')
    checksum = hashlib.sha1(source).hexdigest()
    expected = ('<div id="someId" checksum="%s">' % checksum +
                source +
                '</div>')
    self.assertEquals(expected, template.render(context))
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/template_helpers_test.py/TemplateHelpersTest.testDivChecksum/original