feat: added tests for components

This commit is contained in:
2024-11-22 22:17:06 +01:00
parent 8d6eb3d61c
commit 4247c77a3b
+13
View File
@@ -0,0 +1,13 @@
from django.test import TestCase
from django.urls import reverse
from shop.tests.mixins import CreateProductsMixin
class TestWebComponents(TestCase, CreateProductsMixin):
def setUp(self):
self.product = self.create_product()
def test_list_products_component(self):
response = self.client.get(reverse("shop:list_products"))
assert response.status_code == 200