Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/d/j/django-shop-simplecategories-0.0.5/shop_simplecategories/tests/templatetags.py   django-shop-simplecategories(Download)
 
from ..models import Category
from ..templatetags.shop_simplecategories_tags import RootCategoryTag
 
 
    def test01_should_only_return_parent_categories(self):
        tag = RootCategoryTag(DummyParser(), DummyTokens())
        result = tag.get_context({})
        self.assertTrue(result.has_key('categories'))
        self.assertEqual(len(result['categories']), 2)

src/d/j/django-shop-simplecategories-HEAD/shop_simplecategories/tests/templatetags.py   django-shop-simplecategories(Download)
 
from ..models import Category
from ..templatetags.shop_simplecategories_tags import RootCategoryTag
 
 
    def test01_should_only_return_parent_categories(self):
        tag = RootCategoryTag(DummyParser(), DummyTokens())
        result = tag.get_context({})
        self.assertTrue(result.has_key('categories'))
        self.assertEqual(len(result['categories']), 2)