def test_cart_product()

in server/store/tests.py [0:0]


    def test_cart_product(self):
        data = {
            "payment": {"method": "collect"},
            "customer": {"email": "foo@bar.com"},
            "items": [{"id": 1, "countRequested": 1}],
        }
        cart = CartSerializer(data=data)
        assert cart.is_valid()
        assert len(cart.errors) == 0

        response = client.post(
            reverse("checkout"),
            json.dumps(data),
            content_type="application/json",
        )

        self.assertEqual(response.status_code, 200)