Ignore:
Timestamp:
3 Jan 2015, 07:38:07 (10 years ago)
Author:
Henrik Bettermann
Message:

Replace 'skeleton' by 'pcn'.

Location:
main/ikobacustom.pcn/trunk
Files:
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • main/ikobacustom.pcn/trunk

    • Property svn:global-ignores set to
      bin
      develop-eggs
      parts
      sources
      var
  • main/ikobacustom.pcn/trunk/src

    • Property svn:global-ignores set to
      ikobacustom.pcn.egg-info
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/__init__.py

    r12177 r12371  
    22"""
    33# Make this a package.
    4 from ikobacustom.skeleton.products.product import SkeletonProduct
     4from ikobacustom.pcn.products.product import PCNProduct
    55
    66__all__ = [
    7     'SkeletonProduct',
     7    'PCNProduct',
    88    ]
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/batching.py

    r12284 r12371  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Batch processing for skeleton products.
     18"""Batch processing for pcn products.
    1919"""
    2020import grok
    2121from waeup.ikoba.products.batching import ProductProcessor
    22 from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
    23 from ikobacustom.skeleton.interfaces import MessageFactory as _
     22from ikobacustom.pcn.products.interfaces import IPCNProduct
     23from ikobacustom.pcn.interfaces import MessageFactory as _
    2424
    25 class SkeletonProductProcessor(ProductProcessor):
     25class PCNProductProcessor(ProductProcessor):
    2626
    27     iface = ISkeletonProduct
    28     name = _('Skeleton Product Processor')
    29     util_name = 'skeletonproductprocessor'
     27    iface = IPCNProduct
     28    name = _('PCN Product Processor')
     29    util_name = 'pcnproductprocessor'
    3030    grok.name(util_name)
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/export.py

    r12270 r12371  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Exporters for skeleton products.
     18"""Exporters for pcn products.
    1919"""
    2020import grok
    2121from waeup.ikoba.utils.helpers import iface_names
    2222from waeup.ikoba.products.export import ProductExporter
    23 from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
    24 from ikobacustom.skeleton.interfaces import MessageFactory as _
     23from ikobacustom.pcn.products.interfaces import IPCNProduct
     24from ikobacustom.pcn.interfaces import MessageFactory as _
    2525
    2626
    27 class SkeletonProductExporter(ProductExporter):
     27class PCNProductExporter(ProductExporter):
    2828    """Exporter for products.
    2929    """
    3030
    31     fields = tuple(sorted(iface_names(ISkeletonProduct))) + (
     31    fields = tuple(sorted(iface_names(IPCNProduct))) + (
    3232        'users_with_local_roles',)
    3333
    3434    #: The title under which this exporter will be displayed
    35     #title = _(u'Skeleton Products')
     35    #title = _(u'PCN Products')
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/interfaces.py

    r12292 r12371  
    1717##
    1818from waeup.ikoba.products.interfaces import IProduct
    19 from ikobacustom.skeleton.interfaces import MessageFactory as _
     19from ikobacustom.pcn.interfaces import MessageFactory as _
    2020
    2121
    22 class ISkeletonProduct(IProduct):
    23     """A representation of a skeleton product.
     22class IPCNProduct(IProduct):
     23    """A representation of a pcn product.
    2424
    2525    """
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/product.py

    r12270 r12371  
    2424from waeup.ikoba.utils.helpers import attrs_to_fields
    2525from waeup.ikoba.products.product import Product
    26 from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
    27 from ikobacustom.skeleton.interfaces import MessageFactory as _
     26from ikobacustom.pcn.products.interfaces import IPCNProduct
     27from ikobacustom.pcn.interfaces import MessageFactory as _
    2828
    2929
    30 class SkeletonProduct(Product):
     30class PCNProduct(Product):
    3131    """This is a product.
    3232    """
    33     grok.implements(ISkeletonProduct)
    34     grok.provides(ISkeletonProduct)
     33    grok.implements(IPCNProduct)
     34    grok.provides(IPCNProduct)
    3535
    36 SkeletonProduct = attrs_to_fields(SkeletonProduct)
     36PCNProduct = attrs_to_fields(PCNProduct)
    3737
    3838
    39 class SkeletonProductFactory(grok.GlobalUtility):
     39class PCNProductFactory(grok.GlobalUtility):
    4040    """A factory for products.
    4141    """
     
    4343    grok.name(u'waeup.Product')
    4444    title = u"Create a new product.",
    45     description = u"This factory instantiates new skeleton products."
     45    description = u"This factory instantiates new pcn products."
    4646
    4747    def __call__(self, *args, **kw):
    48         return SkeletonProduct(*args, **kw)
     48        return PCNProduct(*args, **kw)
    4949
    5050    def getInterfaces(self):
    51         return implementedBy(SkeletonProduct)
     51        return implementedBy(PCNProduct)
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/tests/test_browser.py

    r12367 r12371  
    2727from zope.interface.verify import verifyObject, verifyClass
    2828from waeup.ikoba.products.tests.test_batching import ProductImportExportSetup
    29 from ikobacustom.skeleton.products.product import SkeletonProduct
    30 from ikobacustom.skeleton.products.export import SkeletonProductExporter
    31 from ikobacustom.skeleton.products.batching import SkeletonProductProcessor
    32 from ikobacustom.skeleton.testing import FunctionalLayer
     29from ikobacustom.pcn.products.product import PCNProduct
     30from ikobacustom.pcn.products.export import PCNProductExporter
     31from ikobacustom.pcn.products.batching import PCNProductProcessor
     32from ikobacustom.pcn.testing import FunctionalLayer
    3333
    3434
     
    3838
    3939    def setup_for_export(self):
    40         product = SkeletonProduct()
     40        product = PCNProduct()
    4141        product.product_id = u'LIC'
    4242        product.valid_from = datetime.date(2015, 12, 4)
     
    4949        # set values we can expect in export file
    5050        self.setup_for_export()
    51         exporter = SkeletonProductExporter()
     51        exporter = PCNProductExporter()
    5252        exporter.export_all(self.app, self.outfile)
    5353        result = open(self.outfile, 'rb').read()
     
    5757            'license,,[],LIC,,Unnamed,2015-12-04#,,[]\r\n')
    5858        # We can import the same file.
    59         processor = SkeletonProductProcessor()
     59        processor = PCNProductProcessor()
    6060        result = processor.doImport(
    6161            self.outfile,
     
    7777        self.assertEqual(num_fail,0)
    7878        # We can import the same file in update mode.
    79         processor = SkeletonProductProcessor()
     79        processor = PCNProductProcessor()
    8080        result = processor.doImport(
    8181            self.outfile,
  • main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/products/tests/test_product.py

    r12177 r12371  
    1717##
    1818"""
    19 Tests for skeleton products.
     19Tests for pcn products.
    2020"""
    2121from zope.interface.verify import verifyClass, verifyObject
     
    2424from waeup.ikoba.products.container import ProductsContainer
    2525
    26 from ikobacustom.skeleton.testing import (FunctionalLayer, FunctionalTestCase)
    27 from ikobacustom.skeleton.products.product import SkeletonProduct
    28 from ikobacustom.skeleton.products.interfaces import ISkeletonProduct
     26from ikobacustom.pcn.testing import (FunctionalLayer, FunctionalTestCase)
     27from ikobacustom.pcn.products.product import PCNProduct
     28from ikobacustom.pcn.products.interfaces import IPCNProduct
    2929
    30 class SkeletonProductTestCase(FunctionalTestCase):
     30class PCNProductTestCase(FunctionalTestCase):
    3131
    3232    layer = FunctionalLayer
     
    3636        self.assertTrue(
    3737            verifyClass(
    38                 ISkeletonProduct, SkeletonProduct)
     38                IPCNProduct, PCNProduct)
    3939            )
    4040        self.assertTrue(
    4141            verifyObject(
    42                 ISkeletonProduct, SkeletonProduct())
     42                IPCNProduct, PCNProduct())
    4343            )
    4444        return
    4545
    46     def test_addSkeletonProduct(self):
     46    def test_addPCNProduct(self):
    4747        container = ProductsContainer()
    4848        product = createObject(u'waeup.Product')
Note: See TracChangeset for help on using the changeset viewer.