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

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/d/j/django-shop-0.2.0/shop/tests/templatetags.py   django-shop(Download)
    def test01_should_return_all_active_products(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        result = tag.get_context({}, None)
        self.assertTrue('products' in result)
    def test02_should_return_objects_given_as_argument(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        arg_objects = Product.objects.filter(active=False)
        result = tag.get_context({}, arg_objects)
    def test03_should_return_empty_array_if_no_objects_found(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        arg_objects = Product.objects.filter(slug='non-existant-slug')
        result = tag.get_context({}, arg_objects)

src/d/j/django-shop-HEAD/shop/tests/templatetags.py   django-shop(Download)
    def test01_should_return_all_active_products(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        result = tag.get_context({}, None)
        self.assertTrue('products' in result)
    def test02_should_return_objects_given_as_argument(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        arg_objects = Product.objects.filter(active=False)
        result = tag.get_context({}, arg_objects)
    def test03_should_return_empty_array_if_no_objects_found(self):
        self._create_fixture()
        tag = Products(DummyParser(), DummyTokens())
        arg_objects = Product.objects.filter(slug='non-existant-slug')
        result = tag.get_context({}, arg_objects)