From 4247c77a3bce62ae75c8a468a008f8b0e2bbf100 Mon Sep 17 00:00:00 2001 From: Pablo Moreno Date: Fri, 22 Nov 2024 22:17:06 +0100 Subject: [PATCH] feat: added tests for components --- shop/tests/web/test_components.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 shop/tests/web/test_components.py diff --git a/shop/tests/web/test_components.py b/shop/tests/web/test_components.py new file mode 100644 index 0000000..e53f15f --- /dev/null +++ b/shop/tests/web/test_components.py @@ -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