def test_nullboolean_field_chip(): data = querydict({'is_featured': 1}) filter_set = ChoiceFieldFilterSet(data, queryset=Product.objects.all()) field = filter_set.form['is_featured'] items = handle_nullboolean(field, data) assert len(items) == 1 chip = items[0] assert chip['content'] == CHIPS_PATTERN % ('Is featured', 'yes') assert 'is_featured=1' not in chip['link']
def test_nullboolean_field_chip(): data = querydict({"is_featured": 1}) filter_set = ChoiceFieldFilterSet(data, queryset=Product.objects.all()) field = filter_set.form["is_featured"] items = handle_nullboolean(field, data) assert len(items) == 1 chip = items[0] assert chip["content"] == CHIPS_PATTERN % ("Is featured", "yes") assert "is_featured=1" not in chip["link"]
def test_nullboolean_field_chip(): data = querydict({'is_featured': 1}) filter_set = ChoiceFieldFilterSet(data, queryset=Product.objects.all()) field = filter_set.form['is_featured'] items = handle_nullboolean(field, data) assert len(items) == 1 chip = items[0] assert chip['content'] == CHIPS_PATTERN % ('Is featured', 'yes') assert 'is_featured=1' not in chip['link']
def test_nullboolean_field_chip(): data = querydict({"is_featured": 1}) filter_set = ChoiceFieldFilterSet(data, queryset=Product.objects.all()) field = filter_set.form["is_featured"] items = handle_nullboolean(field, data) assert len(items) == 1 chip = items[0] assert chip["content"] == CHIPS_PATTERN % ("Is featured", "yes") assert "is_featured=1" not in chip["link"]