def __init__(self, object, varname): """ The class constructor """ self.object = template.Variable(object) self.varname = template.Variable(varname) self.plugin = plugin_pool.get_plugin('threaded')
def __init__(self, object, tpl_name=None): """ It takes two arguments: `object` (required) is a content object of type Model instance. Second one `tpl_name` (optional) picks for template will be rendered. If not specified, will be used default. """ self.object = template.Variable(object) self.plugin = plugin_pool.get_plugin('threaded') self.template_name = template.Variable(tpl_name) if tpl_name else None
def raises(): """ Raises exception """ plugin_pool.get_plugin("non_existant_plugin")
def test_get_plugin(self): assert plugin_pool.get_plugin("django").__class__ is DjangoCommentPlugin
def __init__(self, codename): """ The class constructor """ self.plugin = plugin_pool.get_plugin(codename)
def setUp(self): self.plugin = plugin_pool.get_plugin('django') self.request = HttpRequest()