def setUp(self): self.portal = self.layer['portal'] self.request = self.layer['request'] set_browserlayer(self.request) # setup mocks alsoProvides(self.portal, ICartItem) provideAdapter(MockCartItemDataProvider)
def setUp(self): self.portal = self.layer['portal'] self.request = self.layer['request'] set_browserlayer(self.request) # create an object for testing setRoles(self.portal, TEST_USER_ID, ['Manager']) login(self.portal, TEST_USER_NAME) self.portal.invokeFactory('Document', 'doc') self.doc = self.portal['doc']
def setUp(self): self.portal = self.layer['portal'] self.request = self.layer['request'] set_browserlayer(self.request) # setup mocks alsoProvides(self.portal, ICartItem) provideAdapter(MockShipping, name='mock_shipping') provideAdapter(MockCartDataProvider) provideAdapter(MockCartItemState) self.cart_data_provider = getMultiAdapter( (self.portal, self.request), interface=ICartDataProvider) self.cart_item_state = getMultiAdapter( (self.portal, self.request), interface=ICartItemState)
def setUp(self): self.portal = self.layer['portal'] self.request = self.layer['request'] set_browserlayer(self.request) # setup mocks alsoProvides(self.portal, ICartItem) provideAdapter(MockShipping, name='mock_shipping') provideAdapter(MockCartDataProvider) provideAdapter(MockCartItemDataProvider) provideAdapter(MockCartItemState) self.cart_data_provider = getMultiAdapter( (self.portal, self.request), interface=ICartDataProvider) self.cart_item_state = getMultiAdapter( (self.portal, self.request), interface=ICartItemState)
def setUp(self): self.portal = self.layer['portal'] self.request = self.layer['request'] set_browserlayer(self.request)