from django.test import TestCase

from eca_catalogue.tests.models import NestedProductCategory


class NestedProductCategoryTestCase(TestCase):
    def test_model(self):
        obj = NestedProductCategory.add_root(name="cat1", slug="cat1")
        self.assertTrue(obj.pk)


from django.test import TestCase

from eca_catalogue.tests.models import NestedProductCategory
from eca_catalogue.tests.factories import ProductCategoryFactory


class ProductCategoryTestCase(TestCase):
    def test_model(self):
        obj = ProductCategoryFactory()
        self.assertTrue(obj.pk)

class NestedProductCategoryTestCase(TestCase):
    def test_model(self):
        obj = NestedProductCategory.add_root(name="cat1", slug="cat1")
        self.assertTrue(obj.pk)


add ProductCategoryTestCase