# Path: tests/catalog/models.py
# def create_product(name, unit_price=100, **kwargs):
#     filters = {
#         'name': name,
#         'slug': slugify(name),
#         'upc': slugify(name),
#         'unit_price': D(unit_price),
#     }
#     filters.update(kwargs)
#     return Product.objects.language().create(**filters)
# 
# def create_category(name, **kwargs):
#     return create_categorization(Category, name, **kwargs)
# 
# def create_brand(name, **kwargs):
#     return create_categorization(Brand, name, **kwargs)
# 
# def create_manufacturer(name, **kwargs):
#     return create_categorization(Manufacturer, name, **kwargs)


from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import (
    create_product, create_category, create_brand, create_manufacturer)
# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class FilterProductsTestCase(TestCase):
    products_url = reverse('catalog_product_list')

    def setUp(self):
        cat_1 = create_category('Cat 1')
        bra_1 = create_brand('Bra 1')
        man_1 = create_manufacturer('Man 1')

        # Empty categorization

# Path: tests/catalog/models.py
# def create_product(name, unit_price=100, **kwargs):
#     filters = {
#         'name': name,
#         'slug': slugify(name),
#         'upc': slugify(name),
#         'unit_price': D(unit_price),
#     }
#     filters.update(kwargs)
#     return Product.objects.language().create(**filters)
# 
# def create_category(name, **kwargs):
#     return create_categorization(Category, name, **kwargs)
# 
# def create_brand(name, **kwargs):
#     return create_categorization(Brand, name, **kwargs)
# 
# def create_manufacturer(name, **kwargs):
#     return create_categorization(Manufacturer, name, **kwargs)


# Path: tests/catalog/views.py
from django.test import TestCase
from django.core.urlresolvers import reverse
from .models import (
    create_product, create_category, create_brand, create_manufacturer)

# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class FilterProductsTestCase(TestCase):
    products_url = reverse('catalog_product_list')

    def setUp(self):
        cat_1 = create_category('Cat 1')
        bra_1 = create_brand('Bra 1')
        man_1 = create_manufacturer('Man 1')

        # Empty categorization

        create_category('Cat empty')