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

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

src/d/j/django-oscar-HEAD/tests/integration/catalogue/product_tests.py   django-oscar(Download)
    def test_upc_uniqueness_enforced(self):
        Product.objects.create(product_class=self.product_class,
                               title='testing', upc='bah')
        self.assertRaises(IntegrityError, Product.objects.create,
                          product_class=self.product_class,
                          title='testing', upc='bah')
 
    def test_allow_two_products_without_upc(self):
        for x in range(2):
            Product.objects.create(product_class=self.product_class,
    def test_top_level_products_are_part_of_browsable_set(self):
        product = Product.objects.create(
            product_class=self.product_class, title=u"Kopfhörer")
        self.assertEqual(set([product]), set(Product.browsable.all()))
 
    def setUp(self):
        super(VariantProductTests, self).setUp()
        self.parent = Product.objects.create(
            title="Parent product", product_class=self.product_class)
 
    def test_variant_products_dont_need_titles(self):
        Product.objects.create(parent=self.parent, product_class=self.product_class)

src/d/j/django-oscar-HEAD/tests/unit/catalogue/__init__.py   django-oscar(Download)
        pickler = pickle.Pickler(src)
 
        product = Product.objects.create(title='test_pickle_product',
                                         product_class=self.product_class)