示例#1
0
 def test_information_type_from_product(self):
     # ProductSeries should inherit information_type from its product."""
     owner = self.factory.makePerson()
     information_type = InformationType.PROPRIETARY
     product = self.factory.makeProduct(
         owner=owner, information_type=information_type)
     series = self.factory.makeProductSeries(product=product)
     with person_logged_in(owner):
         self.assertEqual(
             IInformationType(series).information_type, information_type)
示例#2
0
 def information_type_description(self):
     """A view has the information_type_description of its context."""
     information_typed = IInformationType(self.context, None)
     if information_typed is None:
         return None
     return information_typed.information_type.description
示例#3
0
 def _getContext(self):
     information_typed = IInformationType(self.context, None)
     if information_typed is None:
         return self.context
     return information_typed