Package platecom :: Package utils :: Package Extensions :: Module install
[hide private]
[frames] | no frames]

Module install

source code


Metodos de install para iccommunity.core

@author: Juan Pablo Gimenez
@contact: jpg@rcom.com.ar


Author: Juan Pablo Gimenez <jpg@rcom.com.ar>

Functions [hide private]
 
install_configlets(portal, out)
Method to install platecom user properties...
source code
 
uninstall_configlets(portal, out)
Method to uninstall platecom user properties...
source code
 
install_dependencies(portal, out)
Method to install dependencies...
source code
 
import_gs_profiles(portal, out)
Method to install GS profiles...
source code
 
install(self)
External module to install the product...
source code
 
unimport_gs_profiles(portal, out)
Method to uninstall GS profiles...
source code
 
uninstall(self)
External module to uninstall the product...
source code
Function Details [hide private]

install_configlets(portal, out)

source code 

Method to install platecom user properties...
    @type: portal: PloneSite
    @type out: StringIO

    @rtype: StringIO
    @return: Messages from the GS process

uninstall_configlets(portal, out)

source code 

Method to uninstall platecom user properties...
    @type: portal: PloneSite
    @type out: StringIO

    @rtype: StringIO
    @return: Messages from the GS process

install_dependencies(portal, out)

source code 

Method to install dependencies...
    @type portal: PloneSite
    @param portal: The Plone site object
    @type out: StringIO
    @param out: The object to append the output

    @rtype: StringIO
    @return: Messages from the GS process

some tests here...

import_gs_profiles(portal, out)

source code 

Method to install GS profiles...
    @type portal: PloneSite
    @param portal: The Plone site object
    @type out: StringIO
    @param out: The object to append the output

    @rtype: StringIO
    @return: Messages from the GS process

some tests here...
    >>> from iccommunity.core.config import *
    >>> psetup = self.portal.portal_setup

just test we have registered the profile...
    >>> profilename = PROJECTNAME + ':default'
    >>> PACKAGENAME in [profile['product'] for profile in psetup.listProfileInfo()]
    True
    >>> profilename in [profile['id'] for profile in psetup.listProfileInfo()]
    True

now we can test some stuff modified but that template...
    >>> 'icCommunity' in [ai.getTitle() for ai in portal.portal_actionicons.listActionIcons()]
    True

No se porque este no anda, anda bien en el test funcional...
    >>> # [ai['name'] for ai in portal.portal_controlpanel.listActionInfos()] True

install(self)

source code 

External module to install the product...
    @type self: PloneSite
    @param self: The Plone site object

    @rtype: StringIO
    @return: Messages from the install process

some tests here...
    >>> from iccommunity.core.config import *
    >>> qi = self.portal.portal_quickinstaller
    >>> installed = [ prod['id'] for prod in qi.listInstalledProducts() ]
    >>> PACKAGENAME in installed
    True

unimport_gs_profiles(portal, out)

source code 

Method to uninstall GS profiles...
    @type portal: PloneSite
    @param portal: The Plone site object
    @type out: StringIO
    @param out: The object to append the output

    @rtype: StringIO
    @return: Messages from the GS process

some tests here...
    >>> from iccommunity.core.config import *
    >>> psetup = self.portal.portal_setup

just test we have registered the profile...
    >>> profilename = PROJECTNAME + ':default'
    >>> PACKAGENAME in [profile['product'] for profile in psetup.listProfileInfo()]
    True
    >>> profilename in [profile['id'] for profile in psetup.listProfileInfo()]
    True

now we can test some stuff modified but that template...

uninstall(self)

source code 

External module to uninstall the product...
    @type self: PloneSite
    @param self: The Plone site object

    @rtype: StringIO
    @return: Messages from the install process

some tests here...
    >>> from iccommunity.core.config import *
    >>> qi = self.portal.portal_quickinstaller
    >>> installed = [ prod['id'] for prod in qi.listInstalledProducts() ]
    >>> PACKAGENAME in installed
    True

    >>> self.setRoles(['Manager',])
    >>> qi.uninstallProducts((PACKAGENAME,))
    >>> installed = [ prod['id'] for prod in qi.listInstalledProducts() ]
    >>> PACKAGENAME in installed
    False