Example #1
0
 def makeBranchPopup(self, vocabulary=None):
     # Pick a random, semi-appropriate context.
     context = self.factory.makeProduct()
     if vocabulary is None:
         vocabulary = BranchVocabulary(context)
     request = self.makeRequest()
     return BranchPopupWidget(self.makeField(context, vocabulary),
                              vocabulary, request)
 def setUp(self):
     super(TestBranchVocabulary, self).setUp()
     self._createBranches()
     self.vocab = BranchVocabulary(context=None)