def test_home(self): """Verify that home page renders products.""" # Create some topics and products ProductFactory.create_batch(4) # GET the home page and verify the content r = self.client.get(reverse("home"), follow=True) eq_(200, r.status_code) doc = pq(r.content) eq_(4, len(doc("#products-and-services li")))
def test_home(self): """Verify that home page renders products.""" # Create some topics and products ProductFactory.create_batch(4) # GET the home page and verify the content r = self.client.get(reverse('home'), follow=True) eq_(200, r.status_code) doc = pq(r.content) eq_(4, len(doc('#products-and-services li')))
def test_get_products(self): """Test the get_products() method.""" en_us = DocumentFactory(products=ProductFactory.create_batch(2)) eq_(2, len(en_us.get_products())) # Localized document inherits parent's topics. DocumentFactory(parent=en_us) eq_(2, len(en_us.get_products()))
def test_get_products(self): """Test the get_products() method.""" en_us = DocumentFactory(products=ProductFactory.create_batch(2)) eq_(2, len(en_us.get_products())) # Localized document inherits parent's topics. DocumentFactory(parent=en_us) eq_(2, len(en_us.get_products()))