def makeManageable(self, component=''): """Prepares an instance of Manageable.""" from raptus.article.core.manageable import Manageable context = mock.Mock(spec='absolute_url portal_membership'.split()) manageable = Manageable(context) manageable.component = component return manageable
def makeManageable(self, component='', checkPermission=True): """Prepares an instance of Manageable.""" from raptus.article.core.manageable import Manageable context = mock.Mock(spec='absolute_url portal_membership'.split()) context.absolute_url.return_value = 'http://test' context.portal_membership.checkPermission.return_value = checkPermission manageable = Manageable(context) manageable.component = component return manageable
def makeManageable(self, component='', sort=True, pos=[]): """Prepares an instance of Manageable.""" from raptus.article.core.manageable import Manageable context = mock.Mock(spec='absolute_url portal_membership'.split()) context.absolute_url.return_value = 'http://test' manageable = Manageable(context) manageable.component = component manageable.sort = sort manageable.pos = pos return manageable