Beispiel #1
0
 def idx_fixture(self, request):
     parent_cls = request.param
     parent_ = instance_mock(request, parent_cls)
     category = Category(None, parent_)
     parent_.index.return_value = idx_ = 42
     return category, parent_, idx_
Beispiel #2
0
 def depth_raises_fixture(self, request):
     category = Category(None, None)
     for depth in (1, 2, 1):
         category._sub_categories.append(
             instance_mock(request, Category, depth=depth))
     return category
Beispiel #3
0
def given_a_Category_object(context):
    context.category = Category(None, None)
 def subs_fixture(self):
     sub_categories_ = [42, 24]
     category = Category(None, None)
     category._sub_categories = sub_categories_
     return category, sub_categories_
 def num_str_fixture(self, request):
     label, date_1904, expected_value = request.param
     category = Category(label, None)
     return category, date_1904, expected_value
Beispiel #6
0
 def label_fixture(self):
     label = 'foobar'
     category = Category(label, None)
     return category, label