Beispiel #1
0
 def test_getting_category_for_templatag_from_category_tree_path(self):
     tools.assert_equals(
         _get_category_from_pars_var(
             template.Variable('"%s"' % (self.category.tree_path)),
             self.context), self.category)
     tools.assert_equals(
         _get_category_from_pars_var(
             template.Variable('"%s"' % (self.category_nested.tree_path)),
             self.context), self.category_nested)
Beispiel #2
0
 def test_getting_category_for_templatag_from_category_tree_path(self):
     tools.assert_equals(_get_category_from_pars_var(template.Variable('"%s"' % (self.category.tree_path)), self.context), self.category)
     tools.assert_equals(_get_category_from_pars_var(template.Variable('"%s"' % (self.category_nested.tree_path)), self.context), self.category_nested)
Beispiel #3
0
 def test_getting_category_for_templatag_from_category_tree_path_in_variable(self):
     context = Context({'category': '%s' % (self.category.tree_path)})
     tools.assert_equals(_get_category_from_pars_var(template.Variable('category'), context), self.category)
Beispiel #4
0
 def test_getting_category_for_templatag_from_category_variable(self):
     tools.assert_equals(_get_category_from_pars_var(template.Variable('category'), self.context), self.category)