old_contents: # Third party stuff
  from django.test import TestCase
  
  # Our stuff
  from weideshop.products.models import Category, Subcategory, Product 
  from weideshop.tests.factories.products import CategoryFactory
  
  class CategoryModelTest(TestCase):
  
  	def test_saving_and_retrieving_category(self):
  		first_cats = Category()
  		first_cats.name = 'Clothes'
  		first_cats.category_slug = (first_cats.name).lower
  		first_cats.save()
  
  		saved_cats = Category.objects.all()
  		self.assertEqual(saved_cats.count(), 1)
  
new_contents: # Third party stuff
  from django.test import TestCase
  
  # Our stuff
  from weideshop.products.models import Category, Subcategory, Product 
  from weideshop.tests.factories.products import CategoryFactory
  
  class CategoryModelTest(TestCase):
  
  	def setUp(self):
  		self.first_category = Category(name='Clothes')
  		self.first_category.save()
  
  		self.second_category = Category(name='Vehicles')
  		self.second_category.save()
  
  	def test_saving_and_retrieving_category(self):
  		saved_cats = Category.objects.all()
  		self.assertEqual(saved_cats.count(), 2)
  
  	def test_string_representation(self):
  		self.assertTrue(str(self.first_category.name), 'Clothes')
  
  	def test_category_name_uniqueness(self):
  		category = Category(name='Computers')
  		self.assertNotEqual(str(category.name), self.first_category.name)
  
  	def test_slugs_were_autogenerated(self):
  		self.assertTrue(self.first_category.category_slug)
  		self.assertTrue(self.second_category.category_slug)
  
  	def test_category_slug_uniqueness(self):
  		self.assertNotEqual(self.first_category.category_slug, self.second_category.category_slug)
  
  	def test_verbose_name_plural(self):
  		self.assertEqual(str(Category._meta.verbose_name_plural), 'categories')
  		
  	# def test_is_active_category(self):
  	# 	self.third_category = Category(name='Furnitures', is_active=False)
  	# 	self.third_category.save()
  
  	# 	self.assertTrue(self.third_category.active, False)
  
subject: Test Category model.