def queries_used_for_template(self, template, **context):
        connection.queries_log.clear()
        t = Template(template)
        t.render(Context(context))
        return len(connection.queries)
Return the number of queries used when rendering a template
dataset/ETHPy150Open stephenmcd/mezzanine/mezzanine/utils/tests.py/TestCase.queries_used_for_template