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

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/d/j/django-oscar-HEAD/tests/unit/partner/import_tests.py   django-oscar(Download)
import logging
 
from oscar.apps.partner.importers import CatalogueImporter
from oscar.apps.partner.exceptions import ImportingError
from oscar.apps.catalogue.models import ProductClass, Product
    def setUp(self):
        self.importer = CatalogueImporter(logger)
 
    def test_sending_no_file_argument_raises_exception(self):
        self.importer.afile = None
    def setUp(self):
        self.importer = CatalogueImporter(logger)
        self.importer.handle(TEST_BOOKS_CSV)
        self.product = Product.objects.get(upc='9780115531446')
 
    def setUp(self):
        self.importer = CatalogueImporter(logger, delimiter=";")
 
    def test_import(self):
        self.importer.handle(TEST_BOOKS_SEMICOLON_CSV)
    def setUp(self):
        self.importer = CatalogueImporter(logger, flush=True)
 
    def test_items_are_flushed_by_importer(self):
        upc = "0000000000000"